A072406 Number of values of k for which C(n,k)-C(n-2,k-1) is odd.
1, 2, 3, 2, 4, 4, 6, 4, 6, 8, 6, 4, 8, 8, 12, 8, 10, 16, 6, 4, 8, 8, 12, 8, 12, 16, 12, 8, 16, 16, 24, 16, 18, 32, 6, 4, 8, 8, 12, 8, 12, 16, 12, 8, 16, 16, 24, 16, 20, 32, 12, 8, 16, 16, 24, 16, 24, 32, 24, 16, 32, 32, 48, 32, 34, 64, 6, 4, 8, 8, 12, 8, 12, 16, 12, 8, 16, 16, 24, 16
Offset: 0
Keywords
Examples
a(5)=4 since the values of C(5,k)-C(3,k-1) are 1-0, 5-1, 10-3, 10-3, 5-1, 1-0, i.e. 1,4,7,7,4,1 of which 4 are odd.
Programs
-
Mathematica
Join[{1,2},Table[Count[Table[Binomial[n,k]-Binomial[n-2,k-1],{k,0,n}],?OddQ],{n,2,80}]] (* _Harvey P. Dale, Mar 03 2024 *)
Formula
If 2*2^m+1