A376220 Record values in A174414.
3, 9, 19, 23, 27, 37, 39, 107, 1007, 1041, 1047, 1051, 1073, 10000011, 10000047, 10000109, 1000000000000017, 1000000000000053, 1000000000000071, 1000000000000291, 1000000000000449, 10000000000000000000000000000113, 10000000000000000000000000000193, 10000000000000000000000000000249
Offset: 1
Examples
a(3) = 19 because A376219(3) = 11 and A174414(11) = 19. Thus 19 is the least k such that the concatenation (k+11)||k is prime, and for all j < 11 we have (k+j)||k prime for some k < 19.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..28
Programs
-
Maple
tcat:= proc(a, b) a*10^(1+ilog10(b))+b end proc: f:= proc(n) local k, d; for d from 1 do if igcd(n, 10^d+1) > 1 then next fi; for k from 10^(d-1)+`if`(d=1, 0, 1) to 10^d by 2 do if isprime(tcat(n+k, k)) then return k fi od od end proc: R:= NULL: m:= 0: for n from 1 to 10^6 do v:= f(n); if v > m then m:= v; R:= R, m fi od: R;
-
Python
from itertools import count, islice from math import gcd from sympy import isprime def A376220_gen(): # generator of terms c = 0 for n in count(1): for l in count(1): if gcd(n,(m:=10**l)+1)==1: r = m//10 a = m*(n+r)+r for k in range(r,m): if isprime(a): if k>c: yield k c = k break a += m+1 else: continue break A376220_list = list(islice(A376220_gen(),22)) # Chai Wah Wu, Sep 19 2024
Comments