%I #25 Aug 09 2015 15:57:42
%S 1,2,4,9,11,16,23,24,25,26,33,36,47,49,50,52,59,64,73,74,81,88,96,97,
%T 100,107,121,122,144,146,148,169,177,184,191,193,194,196,218,225,239,
%U 241,242,244,249,256,276,289,292,297,299,311,312,313,324,337,338
%N Numbers n such that there are n numbers in arithmetic progression whose squares sum to a perfect square.
%C 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.
%C 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.
%C 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.)
%C 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:
%C A. Factor n=a^2b, with b squarefree, then
%C 1. If 3 does not divide b(n+1), then b ≅ 1 (mod 3)
%C 2. If b is divisible by 3, then b ≅ 6 (mod 9)
%C 3. 3 is a square (mod b.)
%C B.
%C 1. If n+1 is divisible by 3, then (n+1)/3 is the sum of two perfect squares
%C 2. If n+1 is not divisible by 3, then n+1 is the sum of two perfect squares
%C 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.
%H Thomas Andrews, <a href="http://www.thomasoandrews.com/math/squares.html">Article about this and related problems</a>
%H Thomas Andrews, <a href="/A186699/a186699.txt">Initial Terms</a>
%H <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>
%e 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.
%Y Cf. A134419 is a subsequence.
%K nonn
%O 1,2
%A _Thomas Andrews_, Feb 25 2011, Mar 12 2011
|