OFFSET
0,17
LINKS
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
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Dec 10 2003
STATUS
approved