A088560 Sum of odd entries in row n of Pascal's triangle.
1, 2, 2, 8, 2, 12, 32, 128, 2, 20, 92, 464, 992, 4032, 8192, 32768, 2, 36, 308, 2320, 9692, 52712, 164320, 781312, 1470944, 6249152, 13748672, 56768768, 67100672, 268419072, 536870912, 2147483648, 2, 68, 1124, 14352, 117812, 1003960, 5670400
Offset: 0
Links
- Robert Israel, Table of n, a(n) for n = 0..3420
Programs
-
Maple
T:= [1]: R:= 1: for i from 1 to 50 do T:= [1,op(T[2..-1]+T[1..-2]),1]; R:= R, convert(select(type,T,odd),`+`) od: R; # Robert Israel, Apr 17 2020
-
Mathematica
f[n_] := Plus @@ Select[ Table[ Binomial[n, i], {i, 0, n}], OddQ[ # ] & ]; Table[ f[n], {n, 0, 38}] (* Robert G. Wilson v, Nov 19 2003 *)
-
PARI
a(n)=sum(i=0,n,binomial(n,i)*(binomial(n,i)%2))
Formula
a(2^n)=2; a(2^n-1)=2^(2^n-1); a(2^n+1)=2^(n+1)+4 ... - Benoit Cloitre, Nov 19 2003
Extensions
Edited and extended by Robert G. Wilson v and Ray Chandler, Nov 19 2003
Comments