The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A084413 Smallest prime with "n" as central digit(s), or -1 if no such prime exists. 4
 101, 113, 2, 3, 149, 5, 163, 7, 181, 191, 1103, 11, 1123, 13, 2141, 1151, 1163, 17, 1181, 19, 1201, 1213, 1223, 23, 1249, 1259, 2267, 1277, 1283, 29, 1301, 31, 1321, 2333, 2341, 2351, 1361, 37, 1381, 1399, 1409, 41, 1423, 43, 1447, 1451, 2467, 47, 1481 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS For n=5620 and n=7358, adding only one digit to both sides do not result in any prime. - Robert Price, Sep 16 2023 LINKS Robert Price, Table of n, a(n) for n = 0..5000 Index entries for primes involving decimal expansion of n FORMULA If n is prime, then a(n) = n, else a(n) = A084414(n). - Michel Marcus, Oct 05 2013 EXAMPLE a(1)=113 because 113 is the smallest prime with "1" as central digit. a(10)=1103 because 1103 is the smallest prime with "10" as central digits. PROG (PARI) findex(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)); ); ); } a(n) = if (isprime(n), n, findex(n)); \\ 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 Cf. A032734, A084414. Sequence in context: A294743 A352439 A214527 * A248533 A069691 A084414 Adjacent sequences: A084410 A084411 A084412 * A084414 A084415 A084416 KEYWORD easy,nonn,base,changed AUTHOR Zak Seidov, Jun 24 2003 EXTENSIONS 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.

Last modified September 26 07:50 EDT 2023. Contains 365654 sequences. (Running on oeis4.)