OFFSET
0,1
FORMULA
T(n, k)=1 when n XOR k = 2^m for integer m>=0, T(n, k)=0 elsewhere.
EXAMPLE
T(n,k)=1 when n XOR k is a power of 2:
T(3,2)=1 since 3 XOR 2 = 2^0, T(4,0)=1 since 4 XOR 0 = 2^2,
T(5,1)=1 since 5 XOR 1 = 2^2, T(6,4)=1 since 6 XOR 4 = 2^2.
Rows begin:
[0],
[1, 0],
[1,0, 0],
[0,1, 1,0],
[1,0,0,0, 0],
[0,1,0,0, 1,0],
[0,0,1,0, 1,0,0],
[0,0,0,1, 0,1,1,0],...
PROG
(PARI) T(n, k)=if(n>k&bitxor(n, k)==2^valuation(bitxor(n, k), 2), 1, 0)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Paul D. Hanna, Dec 23 2004
STATUS
approved