OFFSET
1,1
EXAMPLE
8647 (prime), 8646 = 2*3*11*131 and 8645 = 5*7*13*19.
15107 (prime), 15106 = 2*7*13*83 and 15105 = 3*5*19*53.
20407 (prime), 20406 = 2*3*19*179 and 20405 = 5*7*11*53.
MAPLE
N:= 10^5: # for terms <= N
TP:= NULL:
P:= select(isprime, [2, seq(i, i=3..N/30, 2)]):
for i from 1 to nops(P) do
for j from 1 to i-1 while P[i]*P[j] <= N/6 do
for k from 1 to j-1 while P[i]*P[j]*P[k] <= N/2 do
TP:= TP, op(select(`<=`, map(`*`, P[1..k-1], P[i]*P[j]*P[k]), N));
od od od:
TP:= {TP}:
TTP:= TP intersect map(`-`, TP, 1):
sort(convert(select(isprime, map(`+`, TTP, 2)), list)); # Robert Israel, Apr 28 2023
MATHEMATICA
q[n_] := FactorInteger[n][[;; , 2]] == {1, 1, 1, 1}; Select[Prime[Range[10^4]], AllTrue[# - {1, 2}, q] &] (* Amiram Eldar, Apr 26 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Massimo Kofler, Apr 26 2023
STATUS
approved