# Pairs of quadratic polynomials taking values pairs of consecutive squares

Let $f,g \in \mathbb{Z}[x]$ be quadratic and neither square.

For $x,y,z \in \mathbb{Z}$ what is the maximal number of solutions to $f(x)=z^2,g(y)=(z+1)^2$?

Solutions are integral points on the genus $1$ curve $f(x)=z^2,g(y)=(z+1)^2$.

The answer might even be unbounded, though I am interested in explicit records.

Such "matches" appear counter-intuitive to me, might be wrong.

Added Using Aaron's approach got $7$ points on $[x^2+14414400=z^2,y^2+14968800=(z+1)^2$.

The points are:

[(1090, 801, 3950), (1214, 963, 3986), (1472, 1273, 4072), (2006, 1865, 4294), (3104, 3015, 4904), (6297, 6254, 7353), (138574, 138573, 138626)]


The curve with 6 points is rank $4$ and with 7 points is rank $6$.

• Interesting. Have you tried to do something? Do you have any guess? – Pasten Nov 10 '14 at 16:35
• It may be necessary to solve the following system of Diophantine equations? \left\{\begin{aligned}&x^2+a=z^2\\&y^2+b=(z+1)^2\end{aligned}\right. – individ Nov 13 '14 at 14:30
• @individ this is special case, though it is solution too. If you wish, you can solve $a_1x^2+a_2x+a_3=z^2$ and same for the LHS of the second. Though no LHS should be square over Q[x]. – joro Nov 13 '14 at 14:41
• @individ This form has the advantages that a solution $x,y,z$ makes $\pm x, \pm y,z$ a solution and that each individual equation is as easy to solve as factoring $a$ or $b$. But perhaps some other form allows $f,g$ with infinitely many matches. I doubt it, but that too would be nice to prove. – Aaron Meyerowitz Nov 14 '14 at 0:05
• The boundedness of the number of stably integral points on elliptic curves is an open problem. It follows from the Vojta conjectures (see Abramovich, Inv. Math. 127). I think your points are stably integral. Unboundedness probably implies unbounded rank, which is also open. – Felipe Voloch Nov 19 '14 at 1:29

Here is the best example from an enlarged search along with some comments. Like Joro's, it has $10$ positive points.

For $a=73513440=2^7\ 3^3\ 5\ 7\ 11\ 13\ 17$ There are $256$ positive solutions to $x^2-y^2=a$ This gives us $256$ positive integer points $(u,v)$ on the curve $u^2-a=v^2$ and also $256$ points on the curve $u^2+a=v^2.$

Similarly, for $b=191923200=2^{12}\ 3^2\ 5^2\ 7^2\ 17$ there are $243$ positive integer points $(u,v)$ on the curve $u^2-b=v^2$ and also $243$ points on the curve $u^2+b=v^2.$

This gives as $8$ ways to pick an ordered pair of integer-square-ordinate-rich quadrics $(f(u),g(u))$, one for $a$ and one for $b.$ The number of coincidences of the type sought are $0,0,0,1,1,2,4,10.$

for $f(u)=u^2+73513440$ and $g(u)=u^2-191923200$ we have $f(x)=z^2$ and $g(y)=(z+1)^2$ for the $10$ triples $[x,y,z]=$ $$[1174, 16335, 8654], [1578, 16369, 8718], [6761, 17640, 10919], [8097, 18194, 11793],$$$$[8511, 18382, 12081], [8627, 18436, 12163], [17574, 23965, 19554],$$$$[18353, 24542, 20257], [69351, 71240, 69879], [97051, 98410, 97429]$$ LATER also $$[6423,17512,-10713],[10789,19540,-13781],[39581,42802,-40499],[63974,66015,-64546] .$$ The Magma online timed out on the rank of the elliptic curve. Based on the first $10$ points it is at least $7$ and including the other $4$ it is at least $8.$

I left a program running for the weekend to check similar curves for $a=2^4\ 3^2 a' a''$ with $a'$ a divisor of $2^{8}\ 3^6\ 5^5\ 7^3\ 11^2$ and $a''$ the product of $0,1$ or $2$ of $\{{13,17,19,23\}}.$ I mention the details not because I think they are especially inspired, but so that someone can try better choices. This gave $49896$ values $a_1 \lt a_2 \lt \cdots$ and twice that many quadrics.

I looked for pairs with a good number of (positive integer) matches and kept those with at least $7.$ I'm happy to share the results if anyone wants to analyze them. My non-exhaustive search gave $190$ pairs of curves. Of these $2$ had $10$ matches,$3$ had $9$, $16$ had $8$ and the other $169$ had $7.$ Also, the larger $a$ values were not of much use. Maybe higher powers of the small primes or a few more large ones are needed.

Most of the $190$ examples come from pairs $a_i,a_j$ with $|i-j|$ relatively small. Of them, $35$ are under $100$, $81$ are under $500$, $130$ are under $2500$, $168$ are under $5000.$ I checked as far as $|i-j|=7500.$ Note that this is $|i-j|$ and not the more natural $|a_i-a_j|.$

Each of the $49896$ $a$ values gives two curves. Of the $380$ curves which occur among the examples, $366$ $a$ values and $367$ distinct curves are used. This makes it somewhat remarkable, but still probably a coincidence, that the pair of curves $f(u)=u^2+367567200$ and $g(u)=u^2+369452160$ match up well in two ways: There are $7$ triples $[x,y,z]$ with $f(x)=z^2 \text{ and }g(y)=(z+1)^2$ and $7$ other triples with $f(x)=(z+1)^2 \text{ and }g(y)=z^2.$

LATER Actually, that final example has $14$ triples with $[x,y,z]$ with $x,y \gt 0$ and $f(x)=z^2 \text{ and }g(y)=(z+1)^2.$ Of them half have $z \gt 0.$ Magma reports that the rank is $6.$

Both my example and Joro's example with $10$ points $[x,y,z]$ such that $x,y,z \gt 0,$ turn out to also have $4$ more points with $x,y \gt 0 \gt z.$ I've updated the example to show the other $4$ points and rank bound.

• According to the free software sage and mwrank the rank is provably $8$ (this was fast). Let me know if you need code with comments for them. (sage in the cloud in browser doesn't timeout AFAIK). – joro Nov 19 '14 at 6:47
• The integral Weierstrass model of the rank 8 curve have at least 173 integral points (not counting the sign of $y$). – joro Nov 19 '14 at 6:54
• What probabilistic heuristics say about these records? Appears to me the tricks might contradict probability. Though sometimes heuristics can go very bad. – joro Nov 19 '14 at 15:04

What is the best record you have? I managed to get $6$ but not with an example I am fond of. Skip to the end if you want to see it right away. By the way, the question you link to concerns consecutive $x$ making $f(x)$ a square. An example given there is that $x=-3,-2,-1,0,1,2$ make $60x^2+60x+1$ take the values $361,121,1,1,121,361.$

We are certainly familiar with examples such as $2u^2+1$ which are square infinitely often and at predictable places (essentially along one or more geometric progressions, rounded). I'd like to know what can be said about these sets of squares and their relations.

One the other hand, $u^2+t$ and $u^2-t$ can only be square finitely often for any fixed positive $t.$ However we can immediately give all the solutions. They correspond to the solutions of $y^2-x^2=t.$ These come from the pairs $[x,y]=[\frac{t/j-j}{2}, \frac{t/j+j}{2}]$ where $j$ ranges over the divisors of $t$ with $j \le \frac{t}{j}$ and $j \equiv t/j \bmod 2$.

I let a program run through $t$ up to around $80,000$ with over $12$ solutions to $y^2-x^2=t$ (My actual bounds were slightly different in the even and odd cases. There are many integers with $\tau(n)=24$ which might be fruitful.)

Among the cases I checked, $3$ matches happen quite often. $4$ matches somewhat often. $5$ matches a handful of times and $6$ matches only once:

Among the $36$ solutions to solutions $[x,y]$ to $y^2-x^2=50400=2^5\ 3^2\ 5^2\ 7$ are:

$[103, 247], [137, 263], [169, 281], [202, 302], [235, 325],[2515, 2525]$

Among the $40$ solutions to $y^2-x^2=60480=2^6\ 3^3\ 5\ 7$ are

$[32, 248], [96, 264], [138, 282], [177, 303], [214, 326], [2514, 2526].$

SO

For $f(u)=u^2+50400$ and $g(u)=u^2+60480$ and have $f(x)=z^2$ and $g(y)=(z+1)^2$ for the $6$ triples $$(x,y,z)=(103,32,247),(137,96,263),(169,138,281),$$$$( 202,177,302),(235,214,325),(2515,2514,2525)$$

I see no reason to think that there aren't similar examples with larger, even arbitrarily larger, numbers of matches. I do not immediately see a way to specify such examples, but I may be overlooking something simple.

• Thank you Aaron. Don't have personal record yet. – joro Nov 13 '14 at 8:32
• The elliptic curve resulting from your record is rank $4$, which is not bad. – joro Nov 13 '14 at 9:45
• $10$ points on $x^2+14137200 =z^2,y^2+17297280=(z+1)^2$ – joro Nov 13 '14 at 11:43
• If you change the sign of any of x,y it is still solution... – joro Nov 13 '14 at 14:05
• Lower bound for the rank of the 10 point curve is 7 modulo errors. Here is code for magma online (or just magma) for getting elliptic curve and rank with comments: link Second much faster approach for lower bound for the rank later. – joro Nov 14 '14 at 6:58

According to Sage the intersection of these quadrics

$$x^2+14137200 \times 7 = z^2, y^2-34028074080 = (z+1)^2$$

is an elliptic curve of rank $10$.

$$x^2+14137200 \times 7 = z^2, y^2+85363200 = (z+1)^2$$

is an elliptic curve of rank $7$.

Notice how they both build upon the previous example of joro by a factor of $7$.

It would be nice if someone could confirm the calculations in Magma or otherwise.

• Thanks. If you have points on the quadrics, you can find fast lower bound for the rank in magma online with this code: pastebin.com/raw.php?i=ueChn4U5 – joro Nov 18 '14 at 8:27
• How many points you got (not counting sign, x,y are positive) ? – joro Nov 18 '14 at 9:34
• I must tidy up my computations, but by a hasty count I find $11$ points on my rank $10$ example, corresponding to the following $z$-values $[-562319, -229183, -91900, -34395, -33823, 10293, 14777, 56541, 6582 8, 494852, 749733]$. Can you run your Magma code on these points? I have also found a few more examples of rank $7$ and $8$. If of any interest I should tidy it all up, and could submit the curves with the points. – Jesper Petersen Nov 18 '14 at 10:13
• OK. You can automate the generation of magma points in sage, something like: ",".join(['m(pc![%s,%s,%s,1])'%(i[0],i[1],i[2]) for i in pts]) – joro Nov 18 '14 at 10:18
• From your 11 points lower bound for the rank is $9$ (9 are linearly independent), so the rank increased for other reasons (one of them is the root number is $1$) :-). – joro Nov 18 '14 at 13:22