This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A253903 The characteristic function of square pyramidal numbers. 5
 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0 COMMENTS The n-th 1 is followed by n^2 - 1 zeros. Run lengths of zeros gives A005563. - Jeremy Gardiner, Jan 14 2018 Square pyramidal numbers are of the form m(m+1)(2m+1)/6. As pyramid(m) = m(m+1)(2m+1)/6 = m*(m+1/2)*(m+1)/3, (3 * pyramid(m))^(1/3) is slightly less than m + 1/2. - David A. Corneth, Oct 14 2018 LINKS Seiichi Manyama, Table of n, a(n) for n = 0..10000 MATHEMATICA Flatten[Table[Join[{1}, PadRight[{}, n^2-1, 0]], {n, 10}]] (* Harvey P. Dale, Mar 05 2015 *) PROG (PARI) lista(nn) = {id = 0; while (id <= nn, print1(1, ", "); id++; for (k=1, id^2-1, print1(0, ", "); ); ); } \\ Michel Marcus, Feb 20 2015 (PARI) a(n) = {if (n <= 1, return (1)); my(s = 1, k = 2); while (s < n, s += k^2; k++); (s == n); } \\ Michel Marcus, Oct 14 2018 (PARI) a(n) = my(m = sqrtnint(3*n, 3)); n==m*(m+1)*(2*m+1)/6 \\ David A. Corneth, Oct 14 2018 CROSSREFS Cf. A000330 (square pyramidal numbers), A282173. Sequence in context: A094875 A012245 A256436 * A255849 A185059 A179776 Adjacent sequences:  A253900 A253901 A253902 * A253904 A253905 A253906 KEYWORD nonn AUTHOR Mikael Aaltonen, Jan 18 2015 STATUS approved

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

Last modified July 20 16:15 EDT 2019. Contains 325185 sequences. (Running on oeis4.)