The diophantine equation $m = x^2 + 7y^2$

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.

Mathematics Asked by peter.petrov on November 14, 2021

• $$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.

Answered by Jack D'Aurizio on November 14, 2021

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.

Answered by Will Jagy on November 14, 2021

Related Questions

Subgroup element composition

3  Asked on December 10, 2020 by conchild

Motivation of Jacobi symbol

0  Asked on December 9, 2020 by athos

Convergence of points under the Mandelbrot iterated equation

1  Asked on December 9, 2020 by robert-kaman

Finding the quadrilateral with a fixed side and perimeter that has a maximum area

1  Asked on December 9, 2020 by ak2399

Convergence of series $sum_{n=1}^inftyleft[left(1+frac{1}{n}right)^{n+1}-aright]sin{n}$

1  Asked on December 9, 2020 by alans

Why are all linear maps that sends one basis to another basis or to 0 still linear?

3  Asked on December 9, 2020

Combining two random variables

1  Asked on December 9, 2020 by buyanov-igor

Total variation regularization superior to classical quadratic choice

1  Asked on December 9, 2020 by pazu

Why can we not expand $(a+b)^n$ directly when $n$ is a fractional or negative index?

1  Asked on December 8, 2020

Let $A, B$ be skew-symmetric matrices such that $AB = -BA$. Show that $AB = 0$

1  Asked on December 8, 2020 by carlos-andres-henao-acevedo

A question on locally integrable function on $mathbb{R}^n$

1  Asked on December 8, 2020 by kevin_h

How to show that the integral is convergent without actually evaluating it?

4  Asked on December 8, 2020 by sandro-gakharia

Saddle Point Approximation for Multiple Contour Integrals

0  Asked on December 8, 2020 by motherboard

Finding minimum value of observation for a given power in hypothesis testing.

2  Asked on December 8, 2020 by hachiman-hikigaya

What is sum of the Bernoulli numbers?

2  Asked on December 8, 2020 by zerosofthezeta

Composition of two power series. We can compose two power series and get one power series. But why?

1  Asked on December 8, 2020 by tchappy-ha

How much land space is required to meet the energy needs of the United States with solar?

0  Asked on December 7, 2020 by dev-dhruv

Outer measure question (disjoint set st $lambda^*(A cup B) < lambda^*(A) + lambda^*(B)$)

1  Asked on December 7, 2020 by julian-ven

Show that $mathbb{Z}[sqrt{3}]$ is dense in $mathbb{R}.$

1  Asked on December 7, 2020 by confusion

Row Rank and Column vectors of Matrix

1  Asked on December 7, 2020 by james-black