A055600 Numbers of form 2^i*3^j + 1 with i, j >= 0.
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
Examples
a(7) = 13 since 13 = 2^2 * 3^1 + 1.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..1000
- 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.
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
Comments