%I #24 Sep 21 2014 16:22:53
%S 174599,334319,535919,671039,907199,2129399,2298119,3103799,3369959,
%T 4351199,4598159,5697599,6184799,6446159,7224839,7943759,7957319,
%U 8148839,8346959,8656919,9096359,9339119,9463319,9511199,10514159,10780559,11816999,12424319,13781039
%N Primes p such that (p-k)/(k+1) is also prime for k = 1, 2, 3, 4.
%C Could be called 4-safe primes, or safe primes of order 4, as the safe primes are the primes such that (p-1)/2 is prime.
%C Obviously a subsequence of the k-safe primes for k < 4 : A005385 (safe primes, k=1), A181841 (supersafe primes, k=2), A247347 (k=3).
%C a(n) = 119 (mod 120) for all n.
%C These numbers generate sequences 5-4-3-2-1 in A052126.
%H Jens Kruse Andersen, <a href="/A247348/b247348.txt">Table of n, a(n) for n = 1..10000</a>
%t lst={}; Do[p=Prime[n]; If[PrimeQ[(p-1)/2]&&PrimeQ[(p-2)/3]&&PrimeQ[(p-3)/ 4&&PrimeQ[(p-4)/ 5], AppendTo[lst, p]], {n, 2*9!}]; lst
%o (PARI) isokp(v) = (type(v) == "t_INT") && isprime(v);
%o lista(nn) = {forprime(p=2, nn, if (isokp((p-1)/2) && isokp((p-2)/3) && isokp((p-3)/4) && isokp((p-4)/5), print1(p, ", ")););} \\ _Michel Marcus_, Sep 15 2014
%o (Python)
%o from __future__ import division
%o from sympy import prime, isprime
%o A247348_list = [p for p in (5*prime(n)+4 for n in range(1,10**6)) if not ((p-1) % 2 or (p-2) % 3 or (p-3) % 4) and isprime(p) and isprime((p-1)//2) and isprime((p-2)//3) and isprime((p-3)//4)] # _Chai Wah Wu_, Sep 18 2014
%Y Cf. A005385 (safe primes), A181841 (supersafe primes), A247347 (3-safe primes), A163573 (similar definition with (p+k)/(k+1) as primes).
%K nonn
%O 1,1
%A _Jean-Christophe Hervé_, Sep 14 2014
%E More terms from _Michel Marcus_, Sep 15 2014