%I #23 Jan 05 2019 13:48:41
%S 2,3,7,13,17,19,29,37,43,53,59,73,79,97,103,107,109,113,127,137,149,
%T 157,163,173,193,197,223,227,229,233,239,257,293,307,313,317,337,347,
%U 349,379,389,409,433,439,443,449,457,467,479,487
%N The elements of the set P5 in ascending order.
%C P5 is the largest set of primes satisfying the conditions: (1) 5 is not in P5; (2) a prime p>5 is in P5 iff all prime divisors of p-1 are in P5.
%C P5 is also the set of all primes p for which the Pratt tree for p has no node labeled 5.
%C It is conjectured that this sequence is infinite.
%H Ivan Neretin, <a href="/A220814/b220814.txt">Table of n, a(n) for n = 1..10000</a>
%H K. Ford, S. Konyagin and F. Luca, <a href="http://arxiv.org/abs/0904.0473">Prime chains and Pratt trees</a>, arXiv:0904.0473 [math.NT], 2009-2010; Geom. Funct. Anal., 20 (2010), pp. 1231-1258.
%H Kevin Ford, <a href="http://arxiv.org/abs/1212.3498">Sieving by very thin sets of primes, and Pratt trees with missing primes</a>, arXiv preprint arXiv:1212.3498 [math.NT], 2012-2013.
%F Ford proves that a(n) >> n^k for some k > 1. - _Charles R Greathouse IV_, Dec 26 2012
%e 7 is in P5, because 7-1 = 2*3 and 2, 3 are in P5.
%t P5 = {2}; For[p = 2, p < 1000, p = NextPrime[p], If[p != 5 && AllTrue[ FactorInteger[p - 1][[All, 1]], MemberQ[P5, #] &], AppendTo[P5, p]]];
%t P5 (* _Jean-François Alcover_, Jan 05 2019 *)
%o (PARI) P(k,n)=if(n<=k, n<k, my(f=factor(n-1)[,1]); for(i=1, #f, if(!P(k, f[i]), return(0))); 1)
%o is(n)=isprime(n) && P(5,n) \\ _Charles R Greathouse IV_, Dec 26 2012
%Y Cf. A220813, A220815.
%K nonn
%O 1,1
%A _Franz Vrabec_, Dec 22 2012