OFFSET
1,1
COMMENTS
Max Alekseyev (see link in A068695) shows that a(n) always exists. - N. J. A. Sloane, Nov 13 2020
Suggested by the existence question in A228323.
LINKS
EXAMPLE
12 is not prime but 13 is, so a(1)=3.
23 is prime so a(2)=3.
34, 35, 36 are not prime but 37 is, so a(3)=7.
MATHEMATICA
smc[n_]:=Module[{m=n+1}, If[OddQ[n], m++]; While[!PrimeQ[n*10^IntegerLength[ m]+ m], m=m+2]; m]; Array[smc, 70] (* Harvey P. Dale, Apr 30 2016 *)
PROG
(Python)
from sympy import isprime
from itertools import count
def a(n): return next(k for k in count(n+1) if isprime(int(str(n)+str(k))))
print([a(n) for n in range(1, 68)]) # Michael S. Branicky, Oct 18 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Aug 20 2013
STATUS
approved