OFFSET
1,2
COMMENTS
A positive integer n is in this sequence if and only if there is a solution to the Pell-like equation x^2-ny^2=d^2(n-1)n(n+1)/3 for some x,y,d integers.
A positive integer n is in this sequence if and only if it can be written in the form: (u^2-3w^2)/(v^2+3w^2), with u,v,w integers and gcd(v,w)=1. This can also be written as a n(v^2) + 3(n+1)(w^2) = z^2.
If n is in this sequence, then we can find an arithmetic progression of *positive* integers which satisfy this equation. (The description above does not require the sequence to be positive.)
By using the method of Legendre to find whether there exists rational numbers r,s on the curve nr^2 + 3(n+1)s^2 = 1, we get the following necessary and sufficient conditions on n:
A. Factor n=a^2b, with b squarefree, then
1. If 3 does not divide b(n+1), then b ≅ 1 (mod 3)
2. If b is divisible by 3, then b ≅ 6 (mod 9)
3. 3 is a square (mod b.)
B.
1. If n+1 is divisible by 3, then (n+1)/3 is the sum of two perfect squares
2. If n+1 is not divisible by 3, then n+1 is the sum of two perfect squares
When n is a perfect square, we can use the arithmetic sequence starting at m=(3n+2)(sqrt(n)-1)/2 + 6 and common difference 6.
LINKS
Thomas Andrews, Article about this and related problems
Thomas Andrews, Initial Terms
EXAMPLE
For n=4, (13,19,25,31) is an arithmetic progression of length 4, and 13^2+19^2+25^2+31^2 = 46^2, so 4 is in the sequence.
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Andrews, Feb 25 2011, Mar 12 2011
STATUS
approved