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.

A118736 Number of zeros in binary expansion of 3^n.

Original entry on oeis.org

0, 0, 2, 1, 4, 2, 4, 7, 7, 7, 7, 5, 10, 10, 9, 9, 15, 13, 15, 14, 15, 14, 16, 15, 23, 22, 18, 13, 20, 21, 23, 24, 25, 19, 25, 24, 31, 25, 25, 30, 36, 26, 29, 30, 36, 38, 28, 37, 36, 45, 39, 35, 41, 50, 47, 46, 50, 51, 50, 46, 40, 41, 50, 43, 46, 53, 60, 60, 53, 55, 47, 45, 57, 58
Offset: 0

Views

Author

Zak Seidov, May 22 2006

Keywords

Crossrefs

Cf. A011754 (number of ones in binary expansion of 3^n).

Programs

  • Mathematica
    f[n_] := DigitCount[3^n, 2, 0]; Table[f[n], {n, 0, 73}] (* Ray Chandler, Sep 29 2006 *)
  • PARI
    a(n) = #select(x->(x==0), binary(3^n)); \\ Michel Marcus, Apr 14 2020