OFFSET
1,1
COMMENTS
A094551 generalized to squares. Compare to A094552, which has far fewer solutions. For many values of n (5, 13, 25, 41, 61, 85,...), the value of b-a increases by 2 for each successive n. These n are the same as A001844. In other words, when n=i^2+(i+1)^2, then a=n-i-1 and b=n+i-1. The other values of n (35, 39, 51, 111, 143, 160, 856,...), A094523, have comparatively large values of b-a.
EXAMPLE
13 is in this sequence because 10^2+11^2+12^2 = 13^2+14^2.
MATHEMATICA
lst={}; Do[i1=n-1; i2=n; s1=i1^2; s2=i2^2; While[i1>1 && s1!=s2, If[s1<s2, i1--; s1=s1+i1^2, i2++; s2=s2+i2^2]]; If[s1==s2, AppendTo[lst, n]], {n, 2, 4000}]; lst
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, May 10 2004
STATUS
approved