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.

A055600 Numbers of form 2^i*3^j + 1 with i, j >= 0.

Original entry on oeis.org

2, 3, 4, 5, 7, 9, 10, 13, 17, 19, 25, 28, 33, 37, 49, 55, 65, 73, 82, 97, 109, 129, 145, 163, 193, 217, 244, 257, 289, 325, 385, 433, 487, 513, 577, 649, 730, 769, 865, 973, 1025, 1153, 1297, 1459, 1537, 1729, 1945, 2049, 2188, 2305, 2593, 2917, 3073, 3457, 3889
Offset: 1

Views

Author

Henry Bottomley, Jun 01 2000

Keywords

Comments

If X is an n-set and Y a fixed (n-5)-subset of X then a(n-5) is equal to the number of 2-subsets of X intersecting Y. - Milan Janjic, Aug 15 2007

Examples

			a(7) = 13 since 13 = 2^2 * 3^1 + 1.
		

Crossrefs

Primes in this sequence give A005109 (Class 1- or Pierpoint primes).
Cf. A003586.

Programs

  • Mathematica
    mx = 4000; Sort@ Flatten@ Table[ 2^i*3^j + 1, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx/2^i]}] (* Robert G. Wilson v, Aug 17 2012 *)
  • PARI
    is(k) = if(k == 2, 1, k > 2 && vecmax(factor(k - 1, 5)[, 1]) < 5); \\ Amiram Eldar, Sep 02 2024
    
  • Python
    from sympy import integer_log
    def A055600(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: 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() for i in range(integer_log(x,3)[0]+1))
        return bisection(f,n,n)+1 # Chai Wah Wu, Sep 15 2024

Formula

a(n) = A003586(n) + 1.

Extensions

Offset corrected by Amiram Eldar, Sep 02 2024