Primitive binary quadratic form (source code)

= Primitive binary quadratic form
{title2=$\gcd(a,b,c)=1$}

An integral <binary quadratic form> $[a,b,c]$ is primitive when $\gcd(a,b,c)=1$. This condition concerns its <polynomial coefficients>, rather than the values of a particular representing pair. For example, $[1,0,3]$ is primitive, while $[2,0,4]$ has a common <divisor> two and represents only even <integers>.

Primitivity is invariant under <proper equivalence>. Expanding an integer change of variables expresses every new <polynomial coefficient> as an <integer linear combination> of the old ones, so every common <divisor> of the old coefficients divides the new ones. The integer inverse gives the converse. Their <greatest common divisor>, called the content, is therefore unchanged.

A primitive representation separately means $\gcd(x,y)=1$ in $n=f(x,y)$. Even a primitive form can have nonprimitive representations: $20=2^2+4^2$ for $[1,0,1]$. A representation of a <prime number>, however, must use a <coprime> pair, since a common <divisor> $d>1$ would force $d^2$ to divide that prime. This observation drives the <discriminant criterion for prime representation by a binary quadratic form>.