|
|
A228325
|
|
a(n) is the smallest number m>n such that the concatenation nm is prime.
|
|
5
|
|
|
3, 3, 7, 7, 9, 7, 9, 9, 11, 13, 17, 13, 19, 23, 23, 19, 21, 23, 31, 27, 29, 37, 33, 37, 31, 33, 29, 33, 39, 37, 37, 51, 43, 49, 39, 37, 39, 47, 43, 49, 53, 43, 49, 47, 47, 49, 51, 61, 51, 51, 53, 61, 81, 71, 57, 57, 79, 61, 81, 67, 63, 63, 67, 69, 69, 73, 79
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
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))))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|