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”).

A051679
Total number of even entries in first n rows of Pascal's triangle (the zeroth and first rows being 1; 1,1).
2
0, 0, 1, 1, 4, 6, 9, 9, 16, 22, 29, 33, 42, 48, 55, 55, 70, 84, 99, 111, 128, 142, 157, 165, 186, 204, 223, 235, 256, 270, 285, 285, 316, 346, 377, 405, 438, 468, 499, 523, 560, 594, 629, 657, 694, 724, 755, 771, 816, 858, 901, 937, 982, 1020, 1059, 1083, 1132
OFFSET
0,5
LINKS
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, pp. 6, 29.
Eric Weisstein's World of Mathematics, Sierpinski Sieve
FORMULA
a(0)=a(1)=0, a(2n) = 3a(n)+n(n-1)/2, a(2n+1) = 2a(n)+a(n+1)+n(n+1)/2. - Ralf Stephan, Oct 10 2003
n(n+3)/2 - A074330(n). - Ralf Stephan, Oct 10 2003
MATHEMATICA
f[n_] := n + 1 - Sum[ Mod[ Binomial[n, k], 2], {k, 0, n} ]; Table[ Sum[ f[k], {k, 0, n} ], {n, 0, 100} ]
Accumulate[Count[#, _?EvenQ]&/@Table[Binomial[n, k], {n, 0, 60}, {k, 0, n}]] (* Harvey P. Dale, Nov 26 2014 *)
PROG
(PARI) a(n)=if(n<2, 0, if(n%2==0, 3*a(n/2)+n/4*(n/2-1), 2*a((n-1)/2)+a((n+1)/2)+((n-1)/4)*((n+1)/2)))
CROSSREFS
Cf. A006046.
Partial sums of A048967. - Michel Marcus, Feb 16 2016
Sequence in context: A094115 A339856 A163297 * A010378 A166593 A196269
KEYWORD
easy,nice,nonn
AUTHOR
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de)
STATUS
approved