OFFSET
1,1
COMMENTS
LINKS
Robin Houston, Table of n, a(n) for n = 1..8391
Wikipedia, Bijective numeration
PROG
(Sage)
DIGITS = "123456789X"
DECODE = {d: i + 1 for i, d in enumerate(DIGITS)}
def decode(s):
return reduce(lambda n, c: 10 * n + DECODE[c], s, 0)
def search(s):
n = decode(s)
if n > 0:
if not is_prime(n): return
yield n
for digit in DIGITS: yield from search(digit + s)
full = sorted(search(""))
full[:10]
CROSSREFS
KEYWORD
nonn,base,easy,fini,full
AUTHOR
Robin Houston, Jun 19 2019
STATUS
approved