login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123396 a(n) = number of earlier terms each of which, when added to n, give a triangular number. 2
0, 1, 1, 1, 0, 3, 2, 1, 1, 5, 3, 0, 2, 2, 5, 3, 2, 0, 3, 4, 5, 4, 0, 3, 2, 5, 5, 5, 5, 0, 0, 7, 2, 5, 6, 5, 7, 0, 2, 1, 9, 2, 5, 8, 6, 8, 1, 2, 2, 2, 10, 2, 5, 12, 8, 8, 1, 1, 4, 2, 2, 11, 3, 6, 14, 9, 9, 1, 1, 3, 4, 2, 3, 11, 4, 8, 15, 12, 8, 2, 2, 1, 3, 6, 2, 4, 11, 6, 9, 18, 13, 9, 1, 2, 3, 1, 5, 6, 2, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
LINKS
EXAMPLE
a(0)+10 = 10, a(1)+10 = 11, a(2)+10 = 11, a(3)+10 = 11, a(4)+10 = 10, a(5)+10 = 13, a(6)+10 = 12, a(7)+10 = 11, a(8)+10 = 11 and a(9)+10 = 15. Of these, three terms (a(0), a(4), a(9)) are such that, when each is added to 10, the result is a triangular number (i.e. of the form m(m+1)/2). Hence a(10) = 3.
MATHEMATICA
f[l_List] := Append[l, Length[Select[l + Length[l], IntegerQ[Sqrt[8# + 1]] &]]]; Nest[f, {0}, 100] (* Ray Chandler, Oct 16 2006 *)
PROG
(PARI) {m=100; v=vector(m+1); print1(v[1]=0, ", "); for(n=1, m, c=0; for(k=1, n, a=n+v[k]; b=sqrtint(2*a); if(b*(b+1)/2==a, c++)); print1(v[n+1]=c, ", "))} \\ Klaus Brockhaus, Oct 16 2006
CROSSREFS
Cf. A000217.
Sequence in context: A351073 A046225 A269233 * A225800 A176669 A327615
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Oct 14 2006
EXTENSIONS
More terms from Ray Chandler and Klaus Brockhaus, Oct 16 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 17 05:28 EDT 2024. Contains 375985 sequences. (Running on oeis4.)