This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A247348 #30 Jul 07 2025 14:08:00 %S A247348 174599,334319,535919,671039,907199,2129399,2298119,3103799,3369959, %T A247348 4351199,4598159,5697599,6184799,6446159,7224839,7943759,7957319, %U A247348 8148839,8346959,8656919,9096359,9339119,9463319,9511199,10514159,10780559,11816999,12424319,13781039 %N A247348 Primes p such that (p-k)/(k+1) is also prime for k = 1, 2, 3, 4. %C A247348 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 A247348 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 A247348 a(n) = 119 (mod 120) for all n. %C A247348 These numbers generate sequences 5-4-3-2-1 in A052126. %H A247348 Jens Kruse Andersen, <a href="/A247348/b247348.txt">Table of n, a(n) for n = 1..10000</a> %t A247348 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 %t A247348 Select[Prime[Range[900000]],AllTrue[Table[(#-k)/(k+1),{k,4}],PrimeQ]&] (* _Harvey P. Dale_, Jul 07 2025 *) %o A247348 (PARI) isokp(v) = (type(v) == "t_INT") && isprime(v); %o A247348 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 A247348 (Python) %o A247348 from __future__ import division %o A247348 from sympy import prime, isprime %o A247348 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 A247348 Cf. A005385 (safe primes), A181841 (supersafe primes), A247347 (3-safe primes), A163573 (similar definition with (p+k)/(k+1) as primes). %K A247348 nonn %O A247348 1,1 %A A247348 _Jean-Christophe Hervé_, Sep 14 2014 %E A247348 More terms from _Michel Marcus_, Sep 15 2014