close
login
A055600
Numbers of form 2^i*3^j + 1 with i, j >= 0.
15
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,1
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
LINKS
Graham Everest, Peter Rogers, and Thomas Ward, A higher-rank Mersenne problem, Algorithmic Number Theory: 5th International Symposium, ANTS-V Sydney, Australia, July 7-12, 2002 Proceedings 5, Lect. Notes Computer Sci. 2369, Springer Berlin Heidelberg, 2002, pp. 95-107; alternative link.
Milan Janjić, Two Enumerative Functions.
FORMULA
a(n) = A003586(n) + 1.
EXAMPLE
a(7) = 13 since 13 = 2^2 * 3^1 + 1.
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 *)
PROG
(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
CROSSREFS
Primes in this sequence give A005109 (Class 1- or Pierpoint primes).
Cf. A003586.
Sequence in context: A036408 A307002 A274583 * A139528 A178434 A267439
KEYWORD
easy,nonn
AUTHOR
Henry Bottomley, Jun 01 2000
EXTENSIONS
Offset corrected by Amiram Eldar, Sep 02 2024
STATUS
approved