login
A048381
Numbers k such that replacing each nonzero digit d with the d-th prime (replacing each 0 digit with a 1) yields a prime.
3
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 15, 19, 20, 24, 25, 26, 27, 32, 39, 40, 42, 48, 52, 57, 59, 60, 64, 68, 72, 79, 80, 82, 84, 86, 92, 95, 100, 105, 106, 112, 114, 116, 122, 125, 130, 134, 140, 144, 145, 146, 148, 150, 152, 160, 164, 166, 167, 168, 169, 176
OFFSET
1,2
LINKS
EXAMPLE
176 = (1)(7)(6) -> (2)(17)(13) = 21713, which is a prime, so 176 is in the sequence.
MAPLE
filter := proc(n) local L;
L:= convert(n, base, 10);
L:= subs([0=1, seq(i=ithprime(i), i=1..9)], L);
L:= map(t -> op(convert(t, base, 10)), L);
isprime(add(L[i]*10^(i-1), i=1..nops(L)))
end proc:
select(filter, [$1..1000]); # Robert Israel, Oct 16 2018
CROSSREFS
Sequence in context: A334929 A008816 A002271 * A185186 A336580 A115569
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Mar 15 1999
EXTENSIONS
Offset corrected by Robert Israel, Oct 16 2018
STATUS
approved