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.

A036667 Numbers of the form 2^i*3^j, i+j even.

Original entry on oeis.org

1, 4, 6, 9, 16, 24, 36, 54, 64, 81, 96, 144, 216, 256, 324, 384, 486, 576, 729, 864, 1024, 1296, 1536, 1944, 2304, 2916, 3456, 4096, 4374, 5184, 6144, 6561, 7776, 9216, 11664, 13824, 16384, 17496, 20736, 24576, 26244, 31104, 36864, 39366
Offset: 1

Views

Author

Keywords

Crossrefs

Complement of A257999 with respect to A003586.
Intersection of A028260 and A003586.
Cf. A025620 (subsequence), A069352, A022328, A022329.

Programs

  • Haskell
    a036667 n = a036667_list !! (n-1)
    a036667_list = filter (even . flip mod 2 . a001222) a003586_list
    -- Reinhard Zumkeller, May 16 2015
    
  • Mathematica
    max = 40000;
    Reap[Do[k = 2^i 3^j; If[k <= max && EvenQ[i+j], Sow[k]], {i, 0, Log[2, max] // Ceiling}, {j, 0, Log[3, max] // Ceiling}]][[2, 1]] // Union (* Jean-François Alcover, Aug 04 2018 *)
  • Python
    from sympy import integer_log
    def A036667(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum((x//3**i).bit_length()+(i&1^1)>>1 for i in range(integer_log(x, 3)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Jan 30 2025

Formula

A069352(a(n)) mod 2 = 0. - Reinhard Zumkeller, May 16 2015
Sum_{n>=1} 1/a(n) = 7/4. - Amiram Eldar, Feb 18 2021

Extensions

Offset corrected by Reinhard Zumkeller, May 16 2015