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.

A103586 a(0)=1, for n > 0: n-th run consists of 2^n-1 copies of n+1.

Original entry on oeis.org

1, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 0

Views

Author

Benoit Cloitre, Mar 24 2005

Keywords

Comments

a(A214489(n)) = A070939(A214489(n)).

Crossrefs

Number of bits in binary representation of A102370(n).
Cf. A000225.

Programs

  • Haskell
    a103586 n = a070939 (n + a070939 n)
    a103586_list = 1 : concat
       (zipWith (replicate . fromInteger) (tail a000225_list) [2..])
    -- Reinhard Zumkeller, Jul 21 2012
    
  • Mathematica
    Join[{1},Flatten[Table[PadRight[{},2^n-1,n+1],{n,6}]]] (* Harvey P. Dale, Aug 22 2021 *)
  • Python
    def A103586(n): return (m:=n.bit_length())+(n>=(1<Chai Wah Wu, Jun 30 2024

Formula

a(n) = A070939(n + A070939(n)) for n > 0. - Reinhard Zumkeller, Jul 21 2012

Extensions

a(0) = 1 added, definition and offset adjusted by Reinhard Zumkeller, Jul 21 2012