4

I found this theorem.

A prime number $m \ne 7$ can be written as $x^2 + 7y^2$ for $x,y$ integers
iff $m$ is one of these residues modulo $28$
$1, 9, 11, 15, 23, 25$

It is stated in the first pages of this book.

https://www.amazon.co.uk/Primes-Form-ny2-Multiplication-Mathematics/dp/1118390180/

So far so good. But what does that imply for composite numbers $m$? And how does it imply it?
Is there some simple statement of this kind for composite numbers $m$?

I read some theory about all this but it all talks only about primes.
How do we make the leap to composites from there?

I think it's related to this
https://en.wikipedia.org/wiki/Brahmagupta%27s_identity
but I cannot quite make the leap to composites.

Is the leap to composites more complicated than just knowing this theorem and this identity?

E.g. is this following true: if we take $m$ and divide it by its largest divisor $M^2$, then what's left must be factored only into primes of the above mentioned residues?! I thought this is true but seems it's not. I am checking it computationally and it seems to me it is false.

RobPratt
  • 50,938
peter.petrov
  • 12,963
  • 1
    Does this answer your question: https://math.stackexchange.com/questions/3699659/? (Frankly, I am not sure why the theorem uses modulo $28$, when modulo $14$ is sufficient.) – Batominovski Jul 21 '20 at 22:03
  • Are $p$ and $m$ (and the $n$ in the title) related in some way? – John Hughes Jul 21 '20 at 22:04
  • They should all be $m$ sorry. @Batominovski I am not sure I will understand the answer there but I will try. I am asking if there's some easy formulation for composite numbers $m$. – peter.petrov Jul 21 '20 at 22:06
  • The forward direction (that $m$ has such representations implies that $m$ belongs to certain classes modulo $14$ or $28$) is not difficult. Quadratic reciprocity finishes that quickly. The other direction is the part I am not sure whether there exists an elementary argument. – Batominovski Jul 21 '20 at 22:09
  • 1
    $7 = 0^2 + 7 \cdot 1^2$ and does not have one of those residues mod $28$. – Robert Israel Jul 21 '20 at 22:11
  • @RobertIsrael Right, the theorem is just for primes other than 7. – peter.petrov Jul 21 '20 at 22:13
  • By the way, I covered in my answer in the linked thread both the prime and composite cases. – Batominovski Jul 21 '20 at 22:15
  • @Batominovski But that other thread is about some special form of $n$ only. No? – peter.petrov Jul 21 '20 at 22:17
  • 1
    My answer in that link discusses all cases. Certain values of $n$ do not admit such representations. See everything after the paragraph starting with "In general, let $n\in\mathbb{Z}_{>0}$." – Batominovski Jul 21 '20 at 22:17
  • $32 = 5^2+7\cdot 1^2$, but $32 = 28\cdot 1 +2^2$. – rtybase Jul 21 '20 at 22:40

2 Answers2

2

A number $m$ that you are able to factor: there is an integer expression $m = x^2 + 7 y^2$ if and only if

(I) the exponent of the prime $2$ is not one: either that exponent is $0$ or it is at least 2, AND

(II) the exponent of any prime $q \equiv 3,5,6 \pmod 7$ is EVEN

the exponent of $7$ and the exponents of primes $o \equiv 1,2,4 \pmod 7$ are not restricted.

Will Jagy
  • 146,052
2

An addendum to Will Jagy's answer:

  • $x^2+7y^2$ is the only reduced binary quadratic form of discriminant $-28$, hence any odd prime $p$ such that $-7$ is a quadratic residue $\pmod{p}$ can be represented by such a form; by quadratic reciprocity odd primes of the form $7k+1,7k+2,7k+4$ are good primes and primes of the form $7k+3,7k+5,7k+6$ are bad primes
  • $x^2+7y^2$ does not represent $2$ but it represents $4,8,16,32,\ldots$
  • the norm on $\mathbb{Q}[\sqrt{-7}]$ gives us Lagrange identity $(x^2+7y^2)(X^2+7Y^2)=(xX+7yY)^2+7(xY-yX)^2$
  • by Fermat's descent, if an odd squarefree number $m$ can be represented as $x^2+7y^2$ then all its divisors can be represented by such a form.

Summarizing, since $7$ is a Heegner number we have a minor variation on the problem of understanding which numbers can be represented as a sum of two squares.

Jack D'Aurizio
  • 361,689