OFFSET
2,2
LINKS
Seth A. Troisi, Table of n, a(n) for n = 2..100 (terms n=2..53 from Martin Renner)
I. O. Angell and H. J. Godwin, On Truncatable Primes, Math. Comput. 31, 265-267, 1977.
PROG
(Python)
from sympy import isprime, primerange
from sympy.ntheory.digits import digits
def fromdigits(digs, base):
return sum(d*base**i for i, d in enumerate(digs))
def a(n):
prime_lists, an = [(p, ) for p in primerange(1, n)], 0
digits = 1
while len(prime_lists) > 0:
an += len(prime_lists)
candidates = set((d, )+p for p in prime_lists for d in range(1, n))
prime_lists = [c for c in candidates if isprime(fromdigits(c, n))]
digits += 1
return an
print([a(n) for n in range(2, 27)]) # Michael S. Branicky, May 03 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Martin Renner, Oct 20 2002, Sep 24 2007
STATUS
approved