A371475 Smallest weak prime in base 2n+1.
2, 83, 223, 2789, 3347, 4751, 484439, 10513, 10909, 2823167, 68543, 181141, 6139219, 488651, 356479, 399946711, 22549349, 8371249, 660040873, 12088631, 3352003, 234606268969, 84343813, 82751411, 153722088497, 141451831, 11085190183, 350552595007, 535946951, 658716229
Offset: 1
Links
- Terence Tao, A remark on primality testing and decimal expansions, arXiv:0802.3361 [math.NT], 2008.
- Terence Tao, A remark on primality testing and decimal expansions, Journal of the Australian Mathematical Society 91:3 (2011), pp. 405-413.
- Eric Weisstein's World of Mathematics, Weakly Prime
Programs
-
Python
from sympy import isprime, nextprime from sympy.ntheory import digits def A371475(n): if n == 1: return 2 p, r = 5, (n<<1)+1 while True: s = digits(p,r)[1:] l = len(s) for i,j in enumerate(s[::-1]): m = r**i for k in range(j&1,r,2): if k!=j and isprime(p+(k-j)*m): break else: continue break else: return p p = nextprime(p)
Formula
a(n) = A186995(2*n+1).
Extensions
a(22)-a(27) from Michael S. Branicky, Apr 01 2024
a(28)-a(30) from Michael S. Branicky, Apr 06 2024
Comments