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 A385144 #25 Jun 25 2025 10:34:44 %S A385144 101,13331,1333331,188888881,74444444447,1666666666661, %T A385144 188888888888881,16666666666666661,1666666666666666661, %U A385144 155555555555555555551,75555555555555555555557,-1,-1,72222222222222222222222222227,3111111111111111111111111111113,155555555555555555555555555555551 %N A385144 a(n) is the smallest 2*n + 1 digit prime consisting of a string of 2*n - 1 identical digits d sandwiched between two same digits different from d, or -1 if no such prime exists. %C A385144 If we replace 2*n - 1 with 2*n in the definition, all such numerical candidates become composite and divisible by 11. %e A385144 a(1) = 101, because it contains one 0 that is flanked by two 1s, which are different from 0, and no smaller prime has this property. %o A385144 (Python) %o A385144 from sympy import isprime %o A385144 def a(n): return next((t for c in "123456789" for d in "0123456789" if c!=d and isprime(t:=int(c+d*(2*n-1)+c))), -1) %o A385144 print([a(n) for n in range(1, 17)]) # _Michael S. Branicky_, Jun 19 2025 %Y A385144 Cf. A384979. %K A385144 sign,base %O A385144 1,1 %A A385144 _Jean-Marc Rebert_, Jun 19 2025