login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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