# Interesting way to define a sequence of Squares

1. Sep 9, 2011

### ramsey2879

Let A and B be two coprime integers. Find X = zero mod A such that Y = 2*X +1 = 0 mod B. Then 8*(Y +2*N*A*B)*(X + N*A*B) + 1 is a square for all integer N.

If A = 5,B = 7, X = 10, Z = 21 then the sequence of square roots of the Squares for N = -3 to 3 is -379, -249, -99, 41, 181, and 321. Of course X is also variable since X could also equal 45 then Y would be 91.

Last edited: Sep 9, 2011
2. Sep 9, 2011

### atomthick

sorry, what is the question?

3. Sep 9, 2011

### ramsey2879

It would be great if someone could prove or help me prove that my conjecture is valid for all coprime A and B. So far I have only specific examples to show. I also believe that the square roots are = 1 mod A and = -1 mod B if you use a positive or negative square root respectively for n >= 0 or < 0, so that might be a start to making a proof.

Last edited: Sep 9, 2011
4. Sep 9, 2011

### dodo

Hi, ramsey,
the example you give, A=5, B=7, X=10, Y=21, with N=1 gives 35841, which is not a square. In fact i haven't yet obtained any square with the first few numbers I plugged in. Which numbers did you use to obtain squares?

5. Sep 9, 2011

### ramsey2879

Sorry The equation should be 8*(Y+2*N*A*B)*(X+N*A*B)+1 = S^2 I misplaced the 2 in my first post. I think I have it right now. Got to go.

6. Sep 9, 2011

7. Sep 9, 2011

### ramsey2879

Good Now I can say that I have a proof that if C*D = X*(2*X +1) and A = GCD(C,X) and B = GCD(D,2X+1) then 8*(C+2*N*A^2)*(D+N*B^2)+1 = S^2 for all integer N because I got from that conjecture to the result of my post. See if you can see the connection between the two!

8. Sep 13, 2011

### ramsey2879

What is interesting about this is that the pairs (C,D) and (E,F) where E = C+2*A^2 and F = D + B^2 each form the starting terms of two recursive series of the form S(n) = 6*S(n-1) - S(n-2) + K where K is dependent upon the starting terms, i.e. K/2 = Square root of (8*C*D+1) -C - D and likewise substituting E,F for C,D. and S2(2n)-S1(2n) always equals twice a square and S2(2n+1)-S1(2n+1) always equals a square.

An example is S1 = {0,1,6,35,204,1189 ...} S2 = {0,2,14,84,492,2870 ...} The differences are {0,1,8,49,288,1681,...). Because of the previous posts, for any Coprime pair A,B can form the series 2*A^2, B^2, 2*C^2, D^2, 2*E^2, F^2 ... having the recursion S(n) = 6*S(n-1) - S(n-2) + T where T is dependent upon the pair A,B. Of course the product of two adjacent terms in either series S1, S2 is always a triangular number. I can give a proof of this if anyone is interested.

9. Sep 14, 2011

### dodo

I'd be interested in a proof of the statement
On the part about the series, frankly speaking, I have no particular interest. But I'm interested in how you used the GCD conditions in the proof of the statement above.

10. Sep 14, 2011

### ramsey2879

If C*D = N*(2*N+1) and GCD(C,N) = A and GCD(D,2*N +1) = B you can prove that 8*(C + 2*n*A^2)*(D + n*B^2) +1 = S^2 as follows:
It can be shown that C = A*(2*N + 1)/B and D = B*N/A. Making these substitutions you get the following:
S^2 = 8*(A*(2*N+1)/B + 2*n*A^2)*(B*N/A+n*B^2) + 1
S^2 = 8*(2*N+1)/B + 2*n*A)*(B*N + n*A*B^2) + 1 :Repositioning the factor A
S^2 = 8*(2*N +1 + 2*n*A*B)*(N + n*A*B) + 1 :Repositioning the factor B
S^2 = 8*(2*X+1)*X + 1 = 16*X^2 + 8*X + 1 : X = N + n*A*B
S^2 = (4*X + 1)^2

Is this what you wanted? I don't think you need more explanation but I can explain further if you want.

11. Sep 14, 2011

### dodo

Ah, thanks, that was the part I found interesting. If CD = N(2N+1), or C/N = (2N+1)/D, then, upon reduction of these two fractions (which involves dividing up and down by A=GCD(C,N) for the left fraction, and by B=GCD(D,2N+1) for the fraction on the right), after reduction, the numerators will be equal and the denominators will also be equal, so C/A = (2N+1)/B and N/A = D/B, from which the result follows.

Thanks again for the hint!