This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A084413 #19 Aug 27 2025 18:03:31 %S A084413 101,113,2,3,149,5,163,7,181,191,1103,11,1123,13,2141,1151,1163,17, %T A084413 1181,19,1201,1213,1223,23,1249,1259,2267,1277,1283,29,1301,31,1321, %U A084413 2333,2341,2351,1361,37,1381,1399,1409,41,1423,43,1447,1451,2467,47,1481 %N A084413 Smallest prime with "n" as central digit(s), or -1 if no such prime exists. %C A084413 For n=5620 and n=7358, adding only one digit to both sides do not result in any prime. - _Robert Price_, Sep 16 2023 %H A084413 Robert Price, <a href="/A084413/b084413.txt">Table of n, a(n) for n = 0..5000</a> %H A084413 <a href="/index/Pri#piden">Index entries for primes involving decimal expansion of n</a> %F A084413 If n is prime, then a(n) = n, else a(n) = A069691(n). - _Michel Marcus_, Oct 05 2013 %e A084413 a(1)=113 because 113 is the smallest prime with "1" as central digit. %e A084413 a(10)=1103 because 1103 is the smallest prime with "10" as central digits. %o A084413 (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));););} %o A084413 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 %Y A084413 Cf. A032734, A069691. %K A084413 easy,nonn,base,changed %O A084413 0,1 %A A084413 _Zak Seidov_, Jun 24 2003 %E A084413 Escape clause added by _N. J. A. Sloane_, Nov 11 2020