[go: up one dir, main page]

login
A089224
In binary representation: number of zeros of number of zeros of n.
2
0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 2, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 2, 2, 0, 2, 0, 0, 1, 2, 0, 0, 1, 0, 1, 1, 0, 2, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 2, 1, 2, 2, 0, 1, 2, 2, 0, 2, 0, 0, 1, 1, 2, 2, 0, 2, 0, 0, 1, 2, 0, 0, 1, 0, 1, 1, 0, 1, 2, 2, 0, 2, 0
OFFSET
0,17
FORMULA
a(n) = A023416(A023416(n)).
EXAMPLE
a(0) = 0; a(1) = 1; a(16) = 2; a(256) = 3; a(65536) = 4.
MAPLE
a:= n-> (z-> z(z(n)))(k-> `if`(k=0, 1, add(1-i, i=Bits[Split](k)))):
seq(a(n), n=0..100); # Alois P. Heinz, Jul 04 2022
MATHEMATICA
a[n_] := DigitCount[DigitCount[n, 2, 0], 2, 0]; Array[a, 100, 0] (* Amiram Eldar, Jul 24 2023 *)
PROG
(Haskell)
a089224 = a023416 . a023416 -- Reinhard Zumkeller, Mar 31 2015
(Python)
def a(n): return bin(bin(n)[2:].count("0"))[2:].count("0")
print([a(n) for n in range(102)]) # Michael S. Branicky, Jul 04 2022
CROSSREFS
Cf. A023416.
Sequence in context: A274472 A283669 A220945 * A344987 A359325 A325122
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Dec 10 2003
STATUS
approved