login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #17 Oct 13 2019 02:31:39

%S 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,

%T 64,68,72,79,80,82,84,86,92,95,100,105,106,112,114,116,122,125,130,

%U 134,140,144,145,146,148,150,152,160,164,166,167,168,169,176

%N Numbers k such that replacing each nonzero digit d with the d-th prime (replacing each 0 digit with a 1) yields a prime.

%H Robert Israel, <a href="/A048381/b048381.txt">Table of n, a(n) for n = 1..10000</a>

%e 176 = (1)(7)(6) -> (2)(17)(13) = 21713, which is a prime, so 176 is in the sequence.

%p filter := proc(n) local L;

%p L:= convert(n,base,10);

%p L:= subs([0=1,seq(i=ithprime(i),i=1..9)],L);

%p L:= map(t -> op(convert(t,base,10)), L);

%p isprime(add(L[i]*10^(i-1),i=1..nops(L)))

%p end proc:

%p select(filter, [$1..1000]); # _Robert Israel_, Oct 16 2018

%Y Cf. A048380, A048382.

%K nonn,base

%O 1,2

%A _Patrick De Geest_, Mar 15 1999

%E Offset corrected by _Robert Israel_, Oct 16 2018