3

This is a follow up to a question from yesterday regarding the representation of integers by binary quadratic forms with integer coefficients. OEIS A031363 lists the positive integers of the form $x^2+xy-y^2$ which turn out to be the same as those of the form $5x^2-y^2.$ Yesterday's question was how to show the two sets are the same, but I notice that on the OEIS page, it says, under "Formula:

Consists exactly of numbers in which primes == 2 or 3 mod 5 occur with even exponents.

I've been wondering what it takes to prove this, in particular whether it can be shown by elementary methods, since I know no algebraic number theory at all.

I think it's likely to be much easier to prove that numbers not of this form can't be represented than to prove the converse, so I'm starting with that.

For $p=2$ it says, no $n \equiv 2 \pmod 4$ can be so represented, and it's trivial to check that $5x^2-y^2$ cannot be of this form, since the only squares $\pmod 4$ are $0 \text{ and }1.$

For a general attack, I'm thinking about trying to show that $n$ is representable if and only if each of its prime factors is representable. If true, this would reduce the problem to representability of primes. I have some confidence in the "if" part (at least I know that the sum of two squares times the sum of two squares is again the sum of two squares) but I have no feeling for the "only if" part at all. Since $k^2n$ is representable if and only if $n$ is representable (from the form $5x^2-y^2),$ and $1$ is we don't need to consider powers.

This isn't something I need for school or work. I'm retired and sometimes do math for recreation; I want to know if this is a suitable problem for me to work on, that is, one that offers a reasonable chance of success, or at least progress. I'm not asking for a proof; I just want to have some idea of the level of difficulty of the problem.

saulspatz
  • 53,131
  • 1
    Hmmm. You do need to get fairly comfortable with the Legendre Symbol. Everything else follows from class number one. Take a look at http://math.stackexchange.com/questions/1132187/solve-the-following-equation-for-x-and-y/1132347#1132347 If you like Conway's method, there is a nice new book by Weissman https://bookstore.ams.org/mbk-105 – Will Jagy Feb 26 '18 at 22:02
  • Many of the ingredients are in Cox, Primes of the Form $x^2 + n y^2.$ The things that are mostly mentioned briefly are odd middle coefficient and indefinite forms. Much of the indefnite stuff can be ignored because of class number one, but still.. – Will Jagy Feb 26 '18 at 22:05
  • @WillJagy When you say, "class number one" you mean that $\mathbb Q(\sqrt{5})$ is a PID, right? – saulspatz Feb 26 '18 at 22:25
  • I think I will post an answer. What I really mean is that any binary quadratic form of discriminant $5$ is $SL_2 \mathbb Z$ equivalent to the form with coefficients $\langle 1,1,-1 \rangle.$ This much you could learn from, for example Dickson, Introduction to the Theory of Numbers (1929), available as a cheap reprint. – Will Jagy Feb 26 '18 at 22:29

2 Answers2

3

Gauss's theory of quadratic forms can answer all these questions. The form $$x^2+xy+y^2$$ is easy though, it has discriminant $D=5$. All forms of discriminat $5$ are equivalent, (via linear transform with discriminant $1$). The condition for a prime $n$ to be represented by a form of discriminant $5$ is that $$x^2\equiv 5 \pmod {4n}$$ be solvable, in other words that all primes $p$ dividing $n$, we have

$$\left(\frac{5}{p}\right)=+1$$

And by quadratic reciprocity, $$\left(\frac{5}{p}\right)=\left(\frac{p}{5}\right)$$ so we must have that

$$p\equiv 1,4 \pmod{5}$$

This gives the numbers represented (primitively, that is rel prime $x,y$) by some form of discriminant $5$, but they are all equivalent so for the first form. Of course you can always multiply by a square.

The second form has discriminant $D=20$, in this case there are two non equivalent forms, $$2x^2+2xy-2y^2$$ and

$$x^2+4xy-y^2\sim 5x^2-y^2$$ now the first form is just twice the first form and the coefficients are not rel. prime, so we can discount it. Here the condition to be represented, by the second form will be $$x^2\equiv 20 \pmod {4n}$$

And since $4$ is a perfect square this is equivalent to

$$x^2\equiv 5 \pmod {n}$$ and so we get exactly the same answer as the first case, which is what we expected to see.

Somos
  • 35,251
  • 3
  • 30
  • 76
  • The forms have different discriminants, but they represent the same integers, as was shown in the answers to yesterday's question, so I don't get the point of the last paragraph. – saulspatz Feb 26 '18 at 22:19
  • Oh, ok if you want to take it as a given that they represent the same numbers, then you are done. I am just saying that at the moment I have not carried out the calculation based on the second form. – Rene Schipperus Feb 26 '18 at 22:24
  • I put a low-technology version. With indefinite forms, he will need to get confident about how to do Gauss-Lagrange reduction. My favorite version is in Binary Quadratic Forms by Buell. Also some early books by Leonard Eugene Dickson. – Will Jagy Feb 26 '18 at 22:43
  • I edited to include a discussion of the second form. – Rene Schipperus Feb 26 '18 at 22:45
1

Suppose $(5|p) = 1$ for prime $p > 10.$ We can solve $$ t^2 \equiv 5 \pmod p. $$ If necessary by switching to $p-t,$ we can arranged that $t$ is odd, in which case we have actually solved $$ t^2 \equiv 5 \pmod {4p}, $$ or $$ t^2 = 5 + 4 p w, $$ $$ t^2 - 4 p w = 5. $$ That means that $$ \langle p,t,w \rangle $$ are the ordered coefficients of a binary quadratic form of discriminant $5.$ By inequaities, we know that this form is $SL_2 \mathbb Z$ equivalent to $ \langle 1,1,-1 \rangle.$ That means there is an integer matrix with determinant $1$ such that $$ \left( \begin{array}{rr} a & c \\ b & d \end{array} \right) \left( \begin{array}{rr} 2p & t \\ t & 2w \end{array} \right) \left( \begin{array}{rr} a & b \\ c & d \end{array} \right) = \left( \begin{array}{rr} 2 & 1 \\ 1 & -2 \end{array} \right) $$ This also means, with all integers, $$ \left( \begin{array}{rr} d & -c \\ -b & a \end{array} \right) \left( \begin{array}{rr} 2 & 1 \\ 1 & -2 \end{array} \right) \left( \begin{array}{rr} d & -b \\ -c & a \end{array} \right) = \left( \begin{array}{rr} 2p & t \\ t & 2w \end{array} \right) $$ meaning $$ d^2 + d (-c) - c^2 = p $$

Here is an example with $p = 241,$ where $103^2 \equiv 5 \pmod {241}$

jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycle  241  103 11

  0  form            241         103          11  delta      4
  1  form             11         -15           5  delta     -2
  2  form              5          -5           1  delta     -2
  3  form              1           1          -1


           2          -3
          -9          14

To Return  
          14           3
           9           2

0  form   1 1 -1   delta  -1     ambiguous  
1  form   -1 1 1   delta  1     ambiguous            -1 composed with form zero  
2  form   1 1 -1


  form   1 x^2  + 1 x y  -1 y^2 

minimum was   1rep   x = 1   y = 0 disc 5 dSqrt 2  M_Ratio  4
Automorph, written on right of Gram matrix:  
-1  -1
-1  -2
=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ 

The matrix called "To Return" tells us that $$ 14^2 + 14 \cdot 9 - 9^2 = 196 + 126 - 81 = 241 $$

Will Jagy
  • 139,541
  • Thanks. I'm going to have to work through this carefully, but it looks very comprehensible. – saulspatz Feb 26 '18 at 23:07
  • @saulspatz I recommend Binary Quadratic Forms: Classical Theory and Modern Computations by Duncan A. Buell. The computer program above was written based on Buell's book. All the practical aspects needed for the program are on pages 21-26, the theory is partly elsewhere – Will Jagy Feb 26 '18 at 23:14
  • Thanks again. I see they have the book at Linda Hall Library, so I may write a program like yours and play around with it. – saulspatz Feb 26 '18 at 23:28