OFFSET
0,4
COMMENTS
LINKS
FORMULA
a(2^n) = 0, a(2^n-1) = 2^n-1, for n >= 0. a(2^n+1)=3 (n>0), a(2^n+2)=2 (n>1), a(2^n+3)=7 (n>1), a(2^n+4)=4 (n>2), a(2^n+5)=11 (n>2), etc.
MATHEMATICA
Table[Sum[If[BitXor[n, k]< n && OddQ[GCD[n, k]], 1, 0], {k, 0, n}], {n, 0, 81}] (* Indranil Ghosh, Mar 16 2017 *)
PROG
(PARI) a(n)=sum(k=0, n, if(bitxor(n, k)<n&gcd(n, k)%2==1, 1, 0))
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jan 21 2006
STATUS
approved