OFFSET
1,1
COMMENTS
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..500
EXAMPLE
a(3) = 102101, since when concatenating 3-digit numbers, the first three numbers obtained, in increasing order, are 100101, 101100, 101102, which are composite, while the next number in the list is 102101, which is prime.
PROG
(Python)
from sympy import isprime
def a(n):
if n == 1: return 23
lb, ub = 10**(n-1), 10**n
for k in range(lb, ub, 2):
base = k*ub
for inc in [k-1, k+1]:
if inc >= lb and isprime(t:=base+inc):
return t
print([a(n) for n in range(1, 16)]) # Michael S. Branicky, May 19 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Gonzalo MartÃnez, May 19 2024
EXTENSIONS
a(12) and beyond from Michael S. Branicky, May 19 2024
STATUS
approved
