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!)
A338546 For n > 0, a(n) is the number of 1's among the first T(n) terms of the sequence 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, ..., k 1's, k 0's, where T(n) is the n-th triangular number. 0
1, 2, 3, 6, 9, 11, 15, 21, 24, 28, 36, 42, 46, 55, 65, 70, 78, 91, 99, 105, 120, 133, 140, 153, 171, 180, 190, 210, 225, 234, 253, 275, 285, 300, 325, 341, 352, 378, 402, 414, 435, 465, 481, 496, 528, 553, 567, 595, 630, 645, 666, 703, 728, 744, 780, 816 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The sequence of 1's and 0's is more formally defined as A118175.
LINKS
EXAMPLE
Equivalently, this is the number of 1's up to the n-th row of a triangle filled with A118175:
1 (1)
01 (2)
100 (3)
1110 (6)
00111 (9)
100001 (11)
1111000 (15)
00111111 (21)
000000111 (24)
1111000000 (28)
01111111100 (36)
000000111111 (42)
...
MATHEMATICA
With[{nn = 56}, Accumulate@ Map[Total, TakeList[Array[1 - Ceiling[#] + Round[#] &@ Sqrt[#] &, PolygonalNumber[nn]], Range[nn]]]] (* Michael De Vlieger, Nov 02 2020, after Branko Curgus at A118175 *)
PROG
(PARI) f(n) = my(r=sqrt(n)); 1 - ceil(r) + round(r);
a(n) = sum(k=1, n*(n+1)/2, f(k)==1); \\ Michel Marcus, Nov 12 2020
CROSSREFS
Based on A118175 and A000217.
Sequence in context: A097384 A067886 A227000 * A358130 A176189 A057127
KEYWORD
nonn
AUTHOR
Arnauld Chevallier, Nov 02 2020
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 April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)