OFFSET
1,1
COMMENTS
It is conjectured that such a prime exists for every value of n.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..400
Robert G. Wilson v, Comments and first 121 terms
MATHEMATICA
Do[p = 2(10^n - 1)/9; k = 0; While[ ! PrimeQ[p], k++; p = FromDigits[ PadLeft[ IntegerDigits[k, 2], n] + 2]]; Print[p], {n, 1, 30}] (* Robert G. Wilson v, Apr 20 2002 *)
Table[SelectFirst[FromDigits/@Tuples[{2, 3}, n], PrimeQ], {n, 20}] (* Harvey P. Dale, Nov 07 2021 *)
PROG
(Python)
from sympy import isprime
from itertools import product
def a(n):
for b in product("01", repeat=n):
m = int("".join(b).replace("0", "2").replace("1", "3"))
if isprime(m): return m
return None
print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Feb 23 2021 after Robert G. Wilson v
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jan 04 1999
EXTENSIONS
Edited by Jon E. Schoenfield, Mar 27 2014
STATUS
approved