OFFSET
0,2
COMMENTS
XOR BINOMIAL transform of this sequence is A099886.
LINKS
Eric Weisstein's World of Mathematics, Rule 102
FORMULA
a(n) = 2^floor((n+1)/2)*A001317(floor(n/2)), where A001317 forms the XOR BINOMIAL transform of the powers of 2.
It appears that a(2*n) = A117998(n). - Peter Bala, Feb 01 2017
EXAMPLE
XOR difference triangle of the powers of 2 (A099884) begins:
.
(central terms)
|
|
1;
2, 3;
4, 6, 5;
8, 12, 10, 15;
16, 24, 20, 30, 17;
32, 48, 40, 60, 34, 51;
64, 96, 80, 120, 68, 102, 85;
128, 192, 160, 240, 136, 204, 170, 255;
...
PROG
(PARI) {a(n)=local(B); B=0; for(i=0, n\2, B=bitxor(B, binomial(n\2, i)%2*2^(n\2-i))); 2^((n+1)\2)*B}
(Python)
def A099885(n): return sum((bool(~(m:=n>>1)&m-k)^1)<<k for k in range((n>>1)+1))<<(n+1>>1) # Chai Wah Wu, May 03 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul D. Hanna, Oct 28 2004
STATUS
approved