|
|
A127689
|
|
a(1)=3; for n>1, a(n) is least number such that a(n) > a(n-1) and a(1)^2+...+a(n)^2 is a square.
|
|
3
|
|
|
3, 4, 12, 84, 132, 12324, 15960, 26280, 27300, 66660, 115188, 9777193284, 23465263884, 48701491080, 40900397690640, 680008604512020, 127049882801497788, 247290967245178188, 335580091290976716, 1045885075937364972, 1607091702050097396, 3419793695168900508, 5138020847719969956, 10059508412964112740
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Without the a(n) > a(n-1) constraint, the sequence would be A018930.
|
|
LINKS
|
|
|
EXAMPLE
|
a(2)=4 because 3^2+4^2=5^2, a(3)=12 because 3^2+4^2+12^2=13^2 etc.
|
|
MATHEMATICA
|
a = {3}; For[k = 1 + a[[Length[a]]], Length[a] < 11, While[ ! IntegerQ[Sqrt[(k)^2 + Sum[(a[[t]])^2, {t, 1, Length[a]}]]], k++ ]; AppendTo[a, k]]; a
|
|
PROG
|
(PARI) q=3; s=9; for(n=1, 30, b=0; fordiv(s, d, if(d*d>=s, break); t=(s\d-d)/2; if(t>q, b=t); ); q=b; print1(q, ", "); s+=q^2); \\ Max Alekseyev, Nov 23 2012
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|