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.

A257999 Numbers of the form, 2^i*3^j, i+j odd.

Original entry on oeis.org

2, 3, 8, 12, 18, 27, 32, 48, 72, 108, 128, 162, 192, 243, 288, 432, 512, 648, 768, 972, 1152, 1458, 1728, 2048, 2187, 2592, 3072, 3888, 4608, 5832, 6912, 8192, 8748, 10368, 12288, 13122, 15552, 18432, 19683, 23328, 27648, 32768, 34992, 41472, 49152, 52488
Offset: 1

Views

Author

Reinhard Zumkeller, May 16 2015

Keywords

Crossrefs

Complement of A036667 with respect to A003586.
Intersection of A026424 and A003586.

Programs

  • Haskell
    a257999 n = a257999_list !! (n-1)
    a257999_list = filter (odd . flip mod 2 . a001222) a003586_list
    
  • Mathematica
    max = 53000; Reap[Do[k = 2^i*3^j; If[k <= max && OddQ[i + j], Sow[k]], {i, 0, Log[2, max] // Ceiling}, {j, 0, Log[3, max] // Ceiling}]][[2, 1]] // Union (* Amiram Eldar, Feb 18 2021 after Jean-François Alcover at A036667 *)
  • Python
    from sympy import integer_log
    def A257999(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 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 = 1.
Sum_{n>=1} 1/a(n) = 5/4. - Amiram Eldar, Feb 18 2021