login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A371475
Smallest weak prime in base 2n+1.
2
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,1
COMMENTS
Bisection of A186995. Smallest weak prime in odd bases appear to be relatively smaller than smallest weak prime in even bases. This could be due to the fact that for an odd base and an odd prime, any digit change with an odd difference from the original digit results in an even number and thus not prime, so only digit changes with an even difference need to be checked for primality, whereas for an even base, all digit changes need to be checked.
Smallest weak prime in odd bases of the form 6k+3 appear to be relatively larger than smallest weak prime in other odd bases.
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
FORMULA
a(n) = A186995(2*n+1).
PROG
(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)
CROSSREFS
Cf. A186995, A050249 (base 10), A137985 (base 2).
Sequence in context: A007353 A108312 A175449 * A171399 A037069 A065591
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Mar 24 2024
EXTENSIONS
a(22)-a(27) from Michael S. Branicky, Apr 01 2024
a(28)-a(30) from Michael S. Branicky, Apr 06 2024
STATUS
approved