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.

A022331 Index of 2^n within sequence of numbers of form 2^i*3^j (A003586).

Original entry on oeis.org

1, 2, 4, 6, 9, 13, 17, 22, 28, 34, 41, 48, 56, 65, 74, 84, 95, 106, 118, 130, 143, 157, 171, 186, 202, 218, 235, 253, 271, 290, 309, 329, 350, 371, 393, 416, 439, 463, 487, 512, 538, 564, 591, 619, 647, 676, 706, 736, 767, 798, 830, 863, 896, 930, 965, 1000, 1036, 1072
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A000079, A003586, A071521, A020915 (first differences), A152747.
Cf. A022330 (index of 3^n within A003586).

Programs

  • Mathematica
    c[0] = 1; c[n_] := 1 + Sum[Ceiling[j*Log[3, 2]], {j, n}]; Table[c[i], {i, 0, 60}] (* Norman Carey, Jun 13 2012 *)
  • PARI
    a(n)=my(t=1);1+n+sum(k=1,n,logint(t*=2,3)) \\ Ruud H.G. van Tol, Nov 25 2022
    
  • Python
    from sympy import integer_log
    def A022331(n):
        m = 1<Chai Wah Wu, Sep 16 2024

Formula

a(n) = A071521(A000079(n)); A003586(a(n)) = A000079(n). - Reinhard Zumkeller, May 09 2006
a(n) ~ c * n^2, where c = log(2)/(2*log(3)) (A152747). - Amiram Eldar, Apr 07 2023