%I #18 Mar 15 2020 04:18:58
%S 2,3,5,7,13,17,23,37,43,47,53,67,73,83,97,103,107,113,137,167,173,197,
%T 223,283,307,313,317,337,347,353,367,373,383,397,443,467,503,523,547,
%U 607,613,617,643,647,653,673
%N Left-truncatable primes in base-10 bijective numeration.
%C Not identical to A033664; in fact a strict subsequence of A033664. For example, 2003 belongs to A033664 but not to this sequence, since in bijective numerals 2003 is 19X3, whose suffix 9X3 = 1003 = 17 * 59.
%H Robin Houston, <a href="/A308711/b308711.txt">Table of n, a(n) for n = 1..8391</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Bijective_numeration">Bijective numeration</a>
%o (Sage)
%o DIGITS = "123456789X"
%o DECODE = {d: i + 1 for i, d in enumerate(DIGITS)}
%o def decode(s):
%o return reduce(lambda n, c: 10 * n + DECODE[c], s, 0)
%o def search(s):
%o n = decode(s)
%o if n > 0:
%o if not is_prime(n): return
%o yield n
%o for digit in DIGITS: yield from search(digit + s)
%o full = sorted(search(""))
%o full[:10]
%Y Cf. A024785, A033664.
%K nonn,base,easy,fini,full
%O 1,1
%A _Robin Houston_, Jun 19 2019
|