OFFSET
1,1
COMMENTS
A base-3 deletable prime is a prime whose base-3 representation can be reduced to the single-digit prime 2 by deleting one digit at a time, without ever creating a leading zero, so that every intermediate value is prime. a(n) is the smallest such prime with exactly n digits in base 3. This is the base-3 analog of A125589 (base 10).
LINKS
Daniel Okwor, Table of n, a(n) for n = 1..35
Daniel Okwor, A Computational Study of Base-b Deletable Primes, Zenodo, 2026; also at Orygn Research.
EXAMPLE
a(2) = 5: in base 3, 5 is written 12; deleting the digit 1 leaves 2, which is prime.
a(5) = 83: in base 3, 83 is written 10002; the deletions 10002 -> 1002 -> 102 -> 12 -> 2 (base 3) correspond to the primes 83, 29, 11, 5, 2.
PROG
(Python)
from sympy import isprime
def to3(n):
s=""
while n: s=str(n%3)+s; n//=3
return s
def deletable(p):
s=to3(p)
if len(s)==1: return isprime(p)
for i in range(len(s)):
t=s[:i]+s[i+1:]
if t[0]=="0": continue
v=int(t, 3)
if isprime(v) and deletable(v): return True
return False
def a(n):
for p in range(3**(n-1), 3**n):
if isprime(p) and deletable(p): return p
print([a(n) for n in range(1, 12)])
CROSSREFS
KEYWORD
nonn,base,new
AUTHOR
Daniel Okwor, Jun 15 2026
STATUS
approved
