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 A371475 #29 Feb 16 2025 08:34:06 %S A371475 2,83,223,2789,3347,4751,484439,10513,10909,2823167,68543,181141, %T A371475 6139219,488651,356479,399946711,22549349,8371249,660040873,12088631, %U A371475 3352003,234606268969,84343813,82751411,153722088497,141451831,11085190183,350552595007,535946951,658716229 %N A371475 Smallest weak prime in base 2n+1. %C A371475 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. %C A371475 Smallest weak prime in odd bases of the form 6k+3 appear to be relatively larger than smallest weak prime in other odd bases. %H A371475 Terence Tao, <a href="https://arxiv.org/abs/0802.3361">A remark on primality testing and decimal expansions</a>, arXiv:0802.3361 [math.NT], 2008. %H A371475 Terence Tao, <a href="https://doi.org/10.1017/S1446788712000043">A remark on primality testing and decimal expansions</a>, Journal of the Australian Mathematical Society 91:3 (2011), pp. 405-413. %H A371475 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/WeaklyPrime.html">Weakly Prime</a> %F A371475 a(n) = A186995(2*n+1). %o A371475 (Python) %o A371475 from sympy import isprime, nextprime %o A371475 from sympy.ntheory import digits %o A371475 def A371475(n): %o A371475 if n == 1: return 2 %o A371475 p, r = 5, (n<<1)+1 %o A371475 while True: %o A371475 s = digits(p,r)[1:] %o A371475 l = len(s) %o A371475 for i,j in enumerate(s[::-1]): %o A371475 m = r**i %o A371475 for k in range(j&1,r,2): %o A371475 if k!=j and isprime(p+(k-j)*m): %o A371475 break %o A371475 else: %o A371475 continue %o A371475 break %o A371475 else: %o A371475 return p %o A371475 p = nextprime(p) %Y A371475 Cf. A186995, A050249 (base 10), A137985 (base 2). %K A371475 nonn,base %O A371475 1,1 %A A371475 _Chai Wah Wu_, Mar 24 2024 %E A371475 a(22)-a(27) from _Michael S. Branicky_, Apr 01 2024 %E A371475 a(28)-a(30) from _Michael S. Branicky_, Apr 06 2024