A099890 XOR BINOMIAL transform of the odd numbers; also the main diagonal of the XOR difference triangle A099889.
1, 2, 4, 0, 8, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128
Offset: 0
Keywords
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1024
Programs
-
Mathematica
Join[{1},Table[If[IntegerQ[Log2[n]],2n,0],{n,512}]] (* or *) Join[{1},With[{kk=10},Flatten[ Riffle[ 2^Range[kk],Table[PadRight[{},2^k-1,0],{k,0,kk}]]]]] (* Harvey P. Dale, Aug 11 2024 *)
-
PARI
a(n)=local(B);B=0;for(i=0,n,B=bitxor(B,binomial(n,i)%2*(2*(n-i)+1)));B
Formula
a(0) = 1; a(2^n) = 2^(n+1); a(n) = 0 otherwise.
Comments