cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A089224 In binary representation: number of zeros of number of zeros of n.

This page as a plain text file.
%I A089224 #19 Jul 24 2023 02:36:56
%S A089224 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,
%T A089224 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,
%U A089224 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
%N A089224 In binary representation: number of zeros of number of zeros of n.
%H A089224 Reinhard Zumkeller, <a href="/A089224/b089224.txt">Table of n, a(n) for n = 0..10000</a>
%H A089224 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>.
%F A089224 a(n) = A023416(A023416(n)).
%e A089224 a(0) = 0; a(1) = 1; a(16) = 2; a(256) = 3; a(65536) = 4.
%p A089224 a:= n-> (z-> z(z(n)))(k-> `if`(k=0, 1, add(1-i, i=Bits[Split](k)))):
%p A089224 seq(a(n), n=0..100);  # _Alois P. Heinz_, Jul 04 2022
%t A089224 a[n_] := DigitCount[DigitCount[n, 2, 0], 2, 0]; Array[a, 100, 0] (* _Amiram Eldar_, Jul 24 2023 *)
%o A089224 (Haskell)
%o A089224 a089224 = a023416 . a023416  -- _Reinhard Zumkeller_, Mar 31 2015
%o A089224 (Python)
%o A089224 def a(n): return bin(bin(n)[2:].count("0"))[2:].count("0")
%o A089224 print([a(n) for n in range(102)]) # _Michael S. Branicky_, Jul 04 2022
%Y A089224 Cf. A054868, A007088.
%Y A089224 Cf. A023416.
%K A089224 nonn,base
%O A089224 0,17
%A A089224 _Reinhard Zumkeller_, Dec 10 2003