%I #45 Oct 29 2022 11:50:22
%S 0,0,1,1,4,6,9,9,16,22,29,33,42,48,55,55,70,84,99,111,128,142,157,165,
%T 186,204,223,235,256,270,285,285,316,346,377,405,438,468,499,523,560,
%U 594,629,657,694,724,755,771,816,858,901,937,982,1020,1059,1083,1132
%N Total number of even entries in first n rows of Pascal's triangle (the zeroth and first rows being 1; 1,1).
%H T. D. Noe, <a href="/A051679/b051679.txt">Table of n, a(n) for n = 0..1000</a>
%H Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, <a href="https://arxiv.org/abs/2210.10968">Identities and periodic oscillations of divide-and-conquer recurrences splitting at half</a>, arXiv:2210.10968 [cs.DS], 2022, pp. 6, 29.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SierpinskiSieve.html">Sierpinski Sieve</a>
%H <a href="/index/Si#sieve">Index entries for sequences generated by sieves</a>
%F 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
%F n(n+3)/2 - A074330(n). - _Ralf Stephan_, Oct 10 2003
%t f[n_] := n + 1 - Sum[ Mod[ Binomial[n, k], 2], {k, 0, n} ]; Table[ Sum[ f[k], {k, 0, n} ], {n, 0, 100} ]
%t Accumulate[Count[#,_?EvenQ]&/@Table[Binomial[n,k],{n,0,60},{k,0,n}]] (* _Harvey P. Dale_, Nov 26 2014 *)
%o (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)))
%Y Cf. A006046.
%Y Partial sums of A048967. - _Michel Marcus_, Feb 16 2016
%K easy,nice,nonn
%O 0,5
%A Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de)