login
A102563
a(n) = A000120(A001045(n)) - A001045(A000120(n)).
3
0, 0, 0, 1, 1, 2, 2, 1, 3, 4, 4, 3, 5, 4, 4, 3, 7, 8, 8, 7, 9, 8, 8, 7, 11, 10, 10, 9, 11, 10, 10, 5, 15, 16, 16, 15, 17, 16, 16, 15, 19, 18, 18, 17, 19, 18, 18, 13, 23, 22, 22, 21, 23, 22, 22, 17, 25, 24, 24, 19, 25, 20, 20, 11, 31, 32, 32, 31, 33, 32, 32, 31, 35, 34, 34, 33, 35, 34
OFFSET
0,6
LINKS
FORMULA
It would appear that a(2^(n+1)) = A000225(n).
a(2^(n+1)-1) = A001045(n).
a(2^(n+1)+1) = A000079(n).
a(2n+1) = n; a(4n+1) - a(2n+1) = n; a(8n+1) - a(4n+1) = 2n; a(8n+1) - a(2n+1) = 3n.
MATHEMATICA
j[n_] := (2^n - (-1)^n)/3; s[n_] := DigitCount[n, 2, 1]; a[n_] := s[j[n]] - j[s[n]]; Array[a, 100, 0] (* Amiram Eldar, Jul 22 2023 *)
CROSSREFS
Sequence in context: A368604 A246425 A286468 * A121496 A276325 A286548
KEYWORD
easy,nonn,base
AUTHOR
Paul Barry, Jan 14 2005
STATUS
approved