OFFSET
0,2
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..8192
Wikipedia, T-square (fractal)
FORMULA
a(n) = 2 iff n belongs to A075427.
EXAMPLE
PROG
(PARI) a(n) = 2*sum(k=0, n\2, bitand(bitxor(n-k, (n-k)\2), bitxor(k, k\2))==0) - (n==0)
(Python) A363710=lambda n: sum(map(lambda k: not (k^k>>1)&(n-k^n-k>>1), range(n+1>>1)))<<1 if n else 1 # Nathan L. Skirrow, Jun 22 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jun 17 2023
STATUS
approved