OFFSET
1,8
COMMENTS
See A186142 for the digit "9" case. The corresponding sequences with the digits "1" or "7" are not possible because if Xn and XXn are prime, then XXXn will be a multiple of 3 when X is 1 or 7.
A350214 is a variant where the first six terms are not equal to 1. - Bernard Schott, Mar 10 2022
EXAMPLE
a(7) = 1 because 31, 331, 3331, 33331, 333331, 3333331, 33333331 are primes.
MATHEMATICA
m=1; Table[While[d=IntegerDigits[m]; k=0; While[k++; PrependTo[d, 3]; k <=
n && PrimeQ[FromDigits[d]]]; k <= n, m++]; m, {n, 6}]
PROG
(Python)
from sympy import isprime
def a(n):
an = 0
while True:
an = an+1
while not all(isprime(int("3"*k+str(an))) for k in range(1, n+1)):
an += 1
return an
print([a(n) for n in range(1, 9)]) # Michael S. Branicky, Mar 10 2022
CROSSREFS
KEYWORD
nonn,base,hard,more
AUTHOR
Michel Lagneau, Feb 13 2011
EXTENSIONS
a(9)-a(10) from Jonathan Pappas, Oct 22 2021
STATUS
approved