OFFSET
0,1
COMMENTS
Unlike A300102, where the central string contains only zeros, in this sequence the central string can be any digit d, which gives more combinations to find primes sandwiched between two digits that are different from the central string.
As n grows, these primes tend to become sparser, where a(94) is the first term for which k does not exist. Specifically, a(n) = -1, only for 1 term for n < 100 and for 479 terms for n < 1000.
For each n >= 1, there are a fixed number (657) of possible candidates to test for primality; this, plus the increasing sparsity of primes themselves as their number of digits grows, accounts for the pattern noted above. - Michael S. Branicky, Jun 25 2025
LINKS
Gonzalo Martínez, Table of n, a(n) for n = 0..1000
FORMULA
PROG
(Python)
from sympy import isprime
def a(n): return next((t for l in "123456789" for d in "0123456789" if d!=l for r in "123456789" if r!=d and isprime(t:=int(l+d*n+r))), -1)
print([a(n) for n in range(20)]) # Michael S. Branicky, Jun 14 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Gonzalo Martínez, Jun 14 2025
STATUS
approved
