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.

A102572 a(n) = floor(log_4(n)).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 23 2006

Keywords

Crossrefs

Programs

  • Magma
    [ Ilog(4,n) : n in [1..150] ];
    
  • PARI
    a(n)=#digits(n,4)-1 \\ Twice as fast as a(n)=for(i=0,n,(n>>=2)||return(i)); the naïve code a(n)=log(n)\log(4) works for standard realprecision=28 only up to n=4^47-5 and it is slower by another factor 2. - M. F. Hasler, Mar 11 2015
    
  • PARI
    A102572(n)=logint(n,4) \\ M. F. Hasler, Nov 07 2019

Formula

G.f.: (1/(1 - x))*Sum_{k>=1} x^(4^k). - Ilya Gutkovskiy, Jan 08 2017