squares in a second order integer recursive sequence

218 Views Asked by At

This began with For $x^2-3y^2=1$ over integers more than 1, can $\frac{y+1}2$ be square number?

Given a sequence $x_n$ as in https://oeis.org/A001075 $$ 1, 2, 7, 26, 97, 362, 1351, $$ such that $$ x_{n+2} = 4 x_{n+1} - x_n $$

These are the $x$ values in $x^2-3y^2 = 1$

Can we find, and prove, all squares in the sequence and all double squares? I see that Cohn did this for the Fibonacci and Lucas numbers in the 1960's. For this sequence, it seems $1$ is the only square and $2$ is the only doubled square.

Here are the $x_n$ with $3 \leq n \leq 36.$ The great majority are squarefree. Should any of these be of interest, it should be possible to get complete factoring from any computer algebra system. I just divided by primes up to 1,000,000, told it to quit if not finished, just write BIG at the end for a large unfactored number. Oh, I put a Q by hand at the end of a line in case of a square factor.

Fri Mar  6 08:52:25 PST 2020

3   7 =  7
4   26 = 2  13
5   97 =  97
6   362 = 2  181
7   1351 = 7  193
8   5042 = 2  2521
9   18817 = 31  607
10   70226 = 2 13 37  73
11   262087 = 7  37441
12   978122 = 2  489061
13   3650401 = 97  37633
14   13623482 = 2  6811741
15   50843527 = 7^2 337  3079 Q
16   189750626 = 2 13 61 181  661
17   708158977 =  708158977
18   2642885282 = 2  1321442641
19   9863382151 = 7 193  7300801
20   36810643322 = 2  18405321661
21   137379191137 = 79 97  17927599
22   512706121226 = 2 13 757 2521  10333
23   1913445293767 = 7  273349327681
24   7141075053842 = 2 277 3037  4244329
25   26650854921601 = 31 607  1416317953
26   99462344632562 = 2 181  274757858101
27   371198523608647 = 7 103^2  4998431569   Q
28   1385331749802026 = 2 13 37 73 109 1297  139537
29   5170128475599457 = 97  cdot mbox{BIG} 
30   19295182152595802 = 2 349 6961  3971200609
31   72010600134783751 = 7 193 1201 37441  1185361
32   268747218386539202 = 2 373  cdot mbox{BIG} 
33   1002978273411373057 = 127  cdot mbox{BIG} 
34   3743165875258953026 = 2 13 150217 489061  1959673
35   13969685227624439047 = 7 3943  cdot mbox{BIG} 
36   52135575035238803162 = 2 181 2521  cdot mbox{BIG} 

==============================================================

By not printing the number itself, just the line number, I am able to display all the numbers up to line number 500 that have a detectable square factor (by my trial division factoring). All numbers not listed are (or appear to be) squarefree.

jagy@phobeusjunior:~$ grep "\^" mse.txt
15    = 7^2 337  3079
27    = 7 103^2  4998431569
40    = 2 13^2 157 161149 173629  6811741
43    = 7^2 193 337 3079  cdot mbox{BIG} 
71    = 7^2 337 3079 37441 61879 465079  cdot mbox{BIG} 
79    = 7 103^2 193 86113  cdot mbox{BIG} 
99    = 7^3 337 3079 811441  cdot mbox{BIG} 
118    = 2 13^2 37 73 157 161149 173629  cdot mbox{BIG} 
127    = 7^2 193 337 1009 3079  cdot mbox{BIG} 
131    = 7 103^2 37441  cdot mbox{BIG} 
155    = 7^2 337 3079 32647  cdot mbox{BIG} 
183    = 7^2 103^2 337 727 3079  cdot mbox{BIG} 
196    = 2 13^2 61 157 181 661 19501 161149 173629  cdot mbox{BIG} 
211    = 7^2 193 337 1201 3079 37441 61879 151201 465079  cdot mbox{BIG} 
235    = 7 103^2 193 86113  cdot mbox{BIG} 
239    = 7^2 337 3079 3943 16183  cdot mbox{BIG} 
249    = 31^2 607 991  cdot mbox{BIG} 
267    = 7^2 151 337 1063 3079  cdot mbox{BIG} 
274    = 2 13^2 157 757 1093 2521 10333 161149 173629  cdot mbox{BIG} 
287    = 7 103^2  cdot mbox{BIG} 
295    = 7^3 193 337 3079 811441  cdot mbox{BIG} 
323    = 7^2 337 919 3079  cdot mbox{BIG} 
334    = 2 13 37^2 73 1777 2221 14653 17317 65269 99901  cdot mbox{BIG} 
339    = 7 103^2  cdot mbox{BIG} 
351    = 7^2 199 337 1399 3079 37441 61879 465079  cdot mbox{BIG} 
352    = 2 13^2 37 73 109 157 1297 139537 161149 173629 602317  cdot mbox{BIG} 
379    = 7^2 193 337 433 1009 3079 15121  cdot mbox{BIG} 
389    = 97^2 119503  cdot mbox{BIG} 
391    = 7 103^2 193 1201 37441 86113  cdot mbox{BIG} 
407    = 7^2 337 3079 4177 136417  cdot mbox{BIG} 
430    = 2 13^2 157 8581 44617 150217 161149 173629 489061  cdot mbox{BIG} 
435    = 7^2 337 3079  cdot mbox{BIG} 
443    = 7 103^2 3943  cdot mbox{BIG} 
463    = 7^2 193 337 3079 32647 549649  cdot mbox{BIG} 
491    = 7^3 337 3079 37441 61879 294001 465079 633079 811441  cdot mbox{BIG} 
495    = 7 103^2 151 144247  cdot mbox{BIG} 
508    = 2 13^3 157 2029 4057 70981 161149 173629  cdot mbox{BIG} 
519    = 7^2 337 3079  cdot mbox{BIG} 
jagy@phobeusjunior:~$ 
3

There are 3 best solutions below

1
On BEST ANSWER

For the case of the perfect square:

First, by looking at the remainders modulo $3$, we can notice that $3\nmid x_n$. From modulo 5, $x_n$ can only be a perfect square, if $n\equiv 0\pmod{3}$. Let $\alpha=2+\sqrt{3}$ and $\beta=2-\sqrt{3}$. We have: $$x_n=\frac{\alpha^n+\beta^n}{2}$$ We can derive: $$x_{3n}=\frac{\alpha^{3n}+\beta^{3n}}{2}=\frac{\left(\alpha^n+\beta^n\right)^3-3\cdot\left(\alpha\beta\right)^n\left(\alpha^n+\beta^n\right)}{2}=x_n\cdot\left(4x_n^2-3\right)$$ Suppose, that the sequence has a perfect square, other than $1$. Let $k$ be the smallest positive integer, such that $x_k$ is a perfect square, $k=3n$. If $d|x_n$ and $d|4x_n^2-3$, then $d|\left(4x_n^2-3-4x_n(x_n)\right)=3$. Since $\gcd(3, x_n)=1$ we have $\gcd(x_n, 4x_n^2-3)=1$. The product of them can only be a perfect square, if both of them are perfect squares. Since $0<n<k$, $x_n$ is not a perfect square, so we got a contradiction.

(This problem was proposed in KöMaL, a Hungarian mathematical journal for high school students B.5109..)

5
On

I should preface that I am an amateur and by no means a professional mathematician. This post is more of an extended comment. It attempts to answers your question in so much that it might show its equivalence to some other problems in math.


Consider the Diophantine equation $$ X^2-3Y^2=1 \label{a}\tag{1} $$ Following the OEIS the pairs $\left(X_{n},Y_{n}\right)$ with $$ X_{n}=\frac{\left(2+\sqrt{3}\right)^{n}+\left(2-\sqrt{3}\right)^{n}}{2}\in A001075 $$ $$ Y_{n}=\frac{\left(2+\sqrt{3}\right)^{n}-\left(2-\sqrt{3}\right)^{n}}{2\sqrt{3}}\in A001353 $$ are solutions to $\ref{a}.$ Here we begin our index at $n=0$ in which case $X_{n}=1$. It is easily checked that $1-3Y^{2}=1$ if and only if $Y=0.$ If I understand the OP's question we are asking if the numbers $X_{n}\neq 1$ are ever squares or for that matter perfect powers. I proceed with a parity argument on the numbers $n.$

If $n=2k$ then for $k=1,2,3,\ldots$ \begin{align} X_{2k}&=1,7,97,1351,18817,262087,\ldots;\\ \end{align}

which numbers belong to the sequence $A011943.$ Such numbers are related to a question asked by Jim Delaney of Cal Poly as far back as 1989: the mean and standard deviation of any $7$ consecutive numbers are both integers. What natural numbers greater than $1$ share this property with the number $7 ?$ I think it harmless to refer to this query as Delaney's criteria. In a letter to Neil Sloan R.K. Guy gives a short solution to Delaney's criterion. Following the details of the letter we see that the numbers $X_{2k}$ are the numbers that Guy gives as a solution to Delaney's criteria. Moreover details from Guy's letter show that $$ X_{2k}=3m+1; $$ where the numbers $m:=0,2,32,450,6272,\ldots$ For example if $k=4$ then $X_{8}=18817=3\times 6272+1.$ Indeed $[3\times 6272+1]^{2}-3Y^{2}=1$ yields the solution $Y_{8}=A001353(8)=10864.$ Now direct calculation show that \begin{align} (3m+1)^{2}-3Y^2&=1\\ 9m^{2}+6m+1-3Y^{2}&=1\\ 9m^{2}+6m-3Y^{2}&=0\\ 3m^{2}+2m&=Y^2\\ m(3m+2)&=Y^{2}\\ \end{align} If $3m+1=Z^2$ for some $Z\in\mathbb{N}$ then $m=(Z^{2}-1)/3$ and $$ \frac{(Z^{2}-1)(Z^{2}+1)}{3}=\frac{Z^{4}-1}{3}=Y^{2} $$ which has integer solution $Y=0$ and $Z=\pm 1.$ In which case $m=0=k$ and $X_{0}=1.$ I believe this might show that $$ \{X_{2k}\}\text{ }\cap\text{ Squares}=\{1\} $$ If $n=2k+1$ then for $k=1,2,3,\ldots$ $$ X_{2k+1}=2,26,362,5042,70226,\ldots; $$ which numbers belong to the sequence $A094347$. Equivalently $X_{2k+1}$ are the even numbers satisfying equation $\ref{a}.$ As noticed in the cross reference to this sequence $$ \frac{1}{2}X_{2k+1}\in A001570 \label{b}\tag{2} $$ I can now reduce your question to the conjectured perfect powerness of the LHS of $\ref{b}.$ Observe that $\frac{X_{2k+1}}{2}=1$ if and only if $X_{2k+1}=2$ in which case $k=0;$ that is $X_{1}=2.$ Indeed as noted by Maxim Alekseyev: $$ \text{Beal's conjecture}\Rightarrow \{\frac{X_{2k+1}}{2}\}\text{ }\cap\text{PerfectPowers}=\{1\}. $$ This should be enough to show that $X_{2k+1}$ cannot be a square number.

0
On

CW: Here is the original Hungarian answer. It is a magazine (for high school students) contest question posed in May 2020, the deadline was a few days ago.

enter image description here