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.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Dec 10 2003

Keywords

Examples

			a(0) = 0; a(1) = 1; a(16) = 2; a(256) = 3; a(65536) = 4.
		

Crossrefs

Programs

  • Haskell
    a089224 = a023416 . a023416  -- Reinhard Zumkeller, Mar 31 2015
    
  • 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 *)
  • 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

Formula

a(n) = A023416(A023416(n)).