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.

A224782 Length of longest run of consecutive zeros in decimal representation of 2^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 30 2013

Keywords

Comments

a(n) <= A027870(n);
a(A007377(n)) = 0;
a(A006889(n)) = n and a(m) <> n for m < A006889(n).

References

  • Julian Havil, Impossible?: Surprising Solutions to Counterintuitive Conundrums, Princeton University Press 2008, chapter 15, p. 176ff

Programs

  • Haskell
    import Data.List (group)
    a224782 n = a224782_list !! n
    a224782_list = map (foldl h 0 . group . show) a000079_list where
       h x zs@(z:_) = if z == '0' then max x $ length zs else x