Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #24 Jul 11 2014 16:40:22
%S 2,2,2,834007,53918617,53918617
%N a(n) is the smallest prime p such that all the n numbers dip(p), dip(dip(p)), ..., dip(dip(...(dip(p))...)) are primes. The function dip is defined in the comment lines.
%C dip(m) is the number that is obtained from m by changing each zero digit of m to 1 and each nonzero digit i of m to the i-th prime.
%C For example dip(103)=2.1.5=215 and dip(19)=2.23=223.
%C Since each positive integer starts with a nonzero digit, dip is well defined.
%e a(4)=834007 because the four numbers:
%e 1. dip(834007)=19.5.7.1.1.17=19571117,
%e 2. dip(dip(834007)),
%e 3. dip(dip(dip(834007))),
%e 4. dip(dip(dip(dip(834007))))
%e are all primes and 834007 is the smallest prime with this property.
%Y Cf. A000040.
%K nonn,base,more,hard
%O 1,1
%A _Jahangeer Kholdi_ and _Farideh Firoozbakht_, Jul 07 2014