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.
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
Examples
176 = (1)(7)(6) -> (2)(17)(13) = 21713, which is a prime, so 176 is in the sequence.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
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
Extensions
Offset corrected by Robert Israel, Oct 16 2018