A099889 XOR difference triangle of the odd numbers, read by rows.
1, 3, 2, 5, 6, 4, 7, 2, 4, 0, 9, 14, 12, 8, 8, 11, 2, 12, 0, 8, 0, 13, 6, 4, 8, 8, 0, 0, 15, 2, 4, 0, 8, 0, 0, 0, 17, 30, 28, 24, 24, 16, 16, 16, 16, 19, 2, 28, 0, 24, 0, 16, 0, 16, 0, 21, 6, 4, 24, 24, 0, 0, 16, 16, 0, 0, 23, 2, 4, 0, 24, 0, 0, 0, 16, 0, 0, 0, 25, 14, 12, 8, 8, 16, 16, 16, 16, 0
Offset: 0
Examples
Rows begin: [1], [3,2], [5,6,4], [7,2,4,0], [9,14,12,8,8], [11,2,12,0,8,0], [13,6,4,8,8,0,0], [15,2,4,0,8,0,0,0], [17,30,28,24,24,16,16,16,16],...
Links
- Ivan Neretin, Table of n, a(n) for n = 0..8000
Programs
-
Mathematica
mx = 14; Flatten@Table[NestList[BitXor @@@ Transpose[{Most@#, Rest@#}] &, Range[1, 2 mx, 2], mx][[k, n - k]], {n, 2, mx}, {k, n - 1}] (* Ivan Neretin, Sep 01 2016 *)
-
PARI
T(n,k)=local(B);B=0;for(i=0,k,B=bitxor(B,binomial(k,i)%2*(2*(n-i)+1)));B
Formula
T(n, k) = SumXOR_{i=0..k} (C(k, i)mod 2)*(2*(n-i)+1), where SumXOR is the analog of summation under the binary XOR operation and C(k, i)mod 2 = A047999(k, i). T(2^n, 2^n) = 2^(n+1) for n>=0, with T(0, 0)=1.
Comments