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.
%I A069353 #20 Apr 22 2025 03:46:52 %S A069353 0,1,2,3,5,7,8,11,15,17,23,26,31,35,47,53,63,71,80,95,107,127,143,161, %T A069353 191,215,242,255,287,323,383,431,485,511,575,647,728,767,863,971,1023, %U A069353 1151,1295,1457,1535,1727,1943,2047,2186,2303,2591,2915,3071,3455,3887 %N A069353 Numbers of form 2^i*3^j - 1 with i, j >= 0. %C A069353 Are there infinitely many primes in this sequence? See A005105. %C A069353 If m is a term then also 2*m + 1 and 3*m + 2. %H A069353 Graham Everest, Peter Rogers, and Thomas Ward, <a href="https://doi.org/10.1007/3-540-45455-1_8">A higher-rank Mersenne problem</a>, 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. %F A069353 a(n) = A003586(n)-1. %t A069353 With[{max = 4000}, Sort[Flatten[Table[2^i*3^j - 1, {i, 0, Log2[max]}, {j, 0, Log[3, max/2^i]}]]]] (* _Amiram Eldar_, Jul 13 2023 *) %o A069353 (Python) %o A069353 from sympy import integer_log %o A069353 def A069353(n): %o A069353 def bisection(f,kmin=0,kmax=1): %o A069353 while f(kmax) > kmax: kmax <<= 1 %o A069353 kmin = kmax >> 1 %o A069353 while kmax-kmin > 1: %o A069353 kmid = kmax+kmin>>1 %o A069353 if f(kmid) <= kmid: %o A069353 kmax = kmid %o A069353 else: %o A069353 kmin = kmid %o A069353 return kmax %o A069353 def f(x): return n+x-sum(((x+1)//3**i).bit_length() for i in range(integer_log(x+1,3)[0]+1)) %o A069353 return bisection(f,n-1,n-1) # _Chai Wah Wu_, Mar 31 2025 %Y A069353 Cf. A003586, A055600, A069355, A005105. %K A069353 nonn %O A069353 1,3 %A A069353 _Reinhard Zumkeller_, Mar 18 2002