|
|
A084414
|
|
Smallest prime > n having "n" as central digits(s), or -1 if no such prime exists.
|
|
4
|
|
|
101, 113, 127, 131, 149, 151, 163, 173, 181, 191, 1103, 1117, 1123, 2131, 2141, 1151, 1163, 1171, 1181, 1193, 1201, 1213, 1223, 1231, 1249, 1259, 2267, 1277, 1283, 1291, 1301, 1319, 1321, 2333, 2341, 2351, 1361, 1373, 1381, 1399, 1409, 2411, 1423, 1433, 1447
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
For n=2437, 5620 and 7358 adding one digit on each side of n does not produce any prime. - Robert Price, Sep 16 2023
|
|
LINKS
|
|
|
EXAMPLE
|
a(1)=113 because 113 is the smallest prime >1 having "1" as central digit.
|
|
PROG
|
(PARI) a(n) = {for (i = 1, 9, forstep (j=1, 9, 2, v = j + 10*n + i*10^(1+length(Str(n))); if (isprime(v), return (v)); ); ); } \\ code assumes only 1 digit on each side of 'n' will be necessary. See A032734 for numbers that need a better script. - Michel Marcus, Oct 05 2013
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|