OFFSET
0,2
COMMENTS
Sequence is infinite as every partial sum (n>0) is odd, say 2k + 1 and then k^2 is a candidate for the next term.
FORMULA
a(n) = A018930(n)^2. - Benoit Cloitre, Jun 21 2002
EXAMPLE
a(3) = 16 as a(1) + a(2) + a(3) = 25 is also a square.
a(4) = 144 as 0 + 9 + 16 + 144 = 169 is also a square.
MATHEMATICA
a[0] = 0; a[1] = 9; a[n_] := a[n] = (k = Sqrt[a[n - 1]] + 1; s = Sum[a[i], {i, 0, n - 1}]; While[ !IntegerQ[ Sqrt[s + k^2]], k++ ]; k^2);
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 19 2002
EXTENSIONS
Edited by N. J. A. Sloane and Robert G. Wilson v, Jun 21 2002
More terms from Benoit Cloitre, Jun 21 2002
STATUS
approved