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).
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
Offset: 0
Examples
For n = 8: - we have: k A332497(8-k) A332497(k) A332497(8-k) AND A332497(k) - ------------ ---------- --------------------------- 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.
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..8192
- Rémy Sigrist, Scatterplot of (x, y) such that x, y < 2^10 and A003188(x) AND A003188(y) = 0
- Wikipedia, T-square (fractal)
Programs
-
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 # Natalia L. Skirrow, Jun 22 2023
Formula
a(n) = 2 iff n belongs to A075427.
Comments