login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
a(n) >= A084413(n), with equality when n is prime. - Michel Marcus, Oct 05 2013
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
Sequence in context: A084413 A248533 A069691 * A164937 A105992 A038370
KEYWORD
easy,nonn,base
AUTHOR
Zak Seidov, Jun 24 2003
EXTENSIONS
a(21) inserted and more terms from Michel Marcus, Oct 05 2013
Escape clause added by N. J. A. Sloane, Nov 11 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 08:13 EDT 2024. Contains 371922 sequences. (Running on oeis4.)