OFFSET
1,2
COMMENTS
This generalized Pell equation appears in the solution of problems posed in A001032 (and A001033): numbers n such that the sum of squares of n consecutive (odd) positive integers is a square. This sequence is the union of A001032, A001033 and the number 4, which is not a solution to either problem. When n is a square > 1 and not divisible by 3, then the equation has only a finite number of solutions; otherwise it has an infinite number of solutions.
For an n in this sequence, consider solutions with x>0 and y>n. (For n=4, there will be no such solutions.) If y-n+1 is even, then n is in A001032, the n consecutive positive integers begin with (y-n+1)/2 and the sum of the squares is x/2. If y-n+1 is odd, then the n is in A001033, the n consecutive odd positive integers begin with y-n+1 and the sum of the squares is x. For some n, such as 33, there are solutions y1 and y2 such that y1-n+1 is even and y2-n+1 is odd. In this case, n is in both A001032 and A001033.
The reason that 4 is not in A001033 is that there is no sequence of 4 consecutive positive odd squares that add to a square. However, there is a sequence of 4 consecutive odd integers whose squares add up to a square: (-1)^2 + 1^2 + 3^2 + 5^2 = 6^2. - Thomas Andrews, Feb 22 2011
LINKS
Christopher E. Thompson, Table of n, a(n) for n = 1..13437 (up to 250000, extends first 200 terms computed by T. D. Noe).
MATHEMATICA
t={}; n=0; While[Length[t]<200, n++; If[Reduce[x^2-n*y^2==n(n^2-1)/3, {x, y}, Integers] =!= False, AppendTo[t, n]]]; t
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Oct 25 2007
STATUS
approved