Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #51 Jan 29 2025 19:28:50
%S 8647,15107,20407,20771,21491,23003,23531,24767,24971,27967,29147,
%T 33287,34847,36779,42187,42407,42667,43331,43991,46807,46867,51431,
%U 52691,52747,53891,54167,58567,63247,63367,69379,71711,73607,73867,74167,76507,76631,76847,80447,83591,84247,86243
%N Prime numbers preceded by two consecutive numbers which are products of four distinct primes (or tetraprimes).
%H Robert Israel, <a href="/A361796/b361796.txt">Table of n, a(n) for n = 1..1914</a>
%e 8647 (prime), 8646 = 2*3*11*131 and 8645 = 5*7*13*19.
%e 15107 (prime), 15106 = 2*7*13*83 and 15105 = 3*5*19*53.
%e 20407 (prime), 20406 = 2*3*19*179 and 20405 = 5*7*11*53.
%p N:= 10^5: # for terms <= N
%p TP:= NULL:
%p P:= select(isprime, [2,seq(i,i=3..N/30,2)]):
%p for i from 1 to nops(P) do
%p for j from 1 to i-1 while P[i]*P[j] <= N/6 do
%p for k from 1 to j-1 while P[i]*P[j]*P[k] <= N/2 do
%p TP:= TP, op(select(`<=`,map(`*`,P[1..k-1],P[i]*P[j]*P[k]),N));
%p od od od:
%p TP:= {TP}:
%p TTP:= TP intersect map(`-`,TP,1):
%p sort(convert(select(isprime, map(`+`,TTP,2)),list)); # _Robert Israel_, Apr 28 2023
%t q[n_] := FactorInteger[n][[;; , 2]] == {1, 1, 1, 1}; Select[Prime[Range[10^4]], AllTrue[# - {1, 2}, q] &] (* _Amiram Eldar_, Apr 26 2023 *)
%Y Cf. A000040, A046386, A140078 and A362578.
%K nonn,changed
%O 1,1
%A _Massimo Kofler_, Apr 26 2023