|
|
A363710
|
|
a(n) is the number of pairs of nonnegative integers (x, y) such that x + y = n and A003188(x) AND A003188(y) = 0 (where AND denotes the bitwise AND operator).
|
|
2
|
|
|
1, 2, 2, 2, 4, 4, 2, 2, 4, 8, 6, 4, 6, 4, 2, 2, 4, 8, 10, 8, 12, 12, 6, 4, 6, 12, 8, 4, 6, 4, 2, 2, 4, 8, 10, 8, 16, 20, 10, 8, 12, 24, 20, 12, 16, 12, 6, 4, 6, 12, 16, 12, 16, 16, 8, 4, 6, 12, 8, 4, 6, 4, 2, 2, 4, 8, 10, 8, 16, 20, 10, 8, 16, 32, 28, 20, 28
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Equivalently, a(n) is the number of k >= 0 such that A332497(k) + A332498(k) = n.
The set of pairs of nonnegative integers (x, y) such that A003188(x) AND A003188(y) = 0 is related to the T-square fractal (see illustration in Links section).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n = 8:
- we have:
- ------------ ---------- ---------------------------
0 12 0 0
1 4 1 0
2 5 3 1
3 7 2 2
4 6 6 6
5 2 7 2
6 3 5 1
7 1 4 0
8 0 12 0
- so a(8) = 4.
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|