login
A121383
a(0)=3. a(n) = number of earlier terms which, each added to n, sum to a square.
1
3, 1, 0, 1, 1, 0, 1, 0, 4, 3, 0, 0, 1, 2, 1, 6, 5, 0, 0, 1, 1, 1, 2, 2, 9, 7, 0, 1, 0, 1, 1, 1, 1, 2, 4, 14, 9, 0, 0, 0, 2, 0, 1, 1, 1, 2, 2, 7, 17, 13, 1, 1, 0, 0, 0, 2, 0, 2, 1, 1, 2, 2, 11, 21, 18, 0, 0, 1, 1, 0, 1, 0, 2, 0, 2, 1, 1, 2, 2, 16, 26, 22, 1, 1
OFFSET
0,1
COMMENTS
Does every nonnegative integer occur eventually? Analogous to A123396 a(0)=0. a(n) = number of earlier terms each of which, when added to n, the sum is a triangular number.
LINKS
EXAMPLE
a(6) = 1 because the previous terms are 3, 1, 0, 1, 1, 0, and among them only one (3) added to 6 gives a square (9).
MATHEMATICA
a[0] = 3; a[n_] := a[n] = Length@ Select[ Range[0, n-1], IntegerQ@ Sqrt[n + a[#]] &]; a /@ Range[0, 90] (* Giovanni Resta, Jun 13 2016 *)
CROSSREFS
Cf. A123396.
Sequence in context: A307753 A181116 A051834 * A194521 A181434 A294018
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Oct 14 2006
EXTENSIONS
Data section corrected and extended by Giovanni Resta, Jun 13 2016
STATUS
approved