OFFSET
1,1
COMMENTS
Terms are of the form 4k + 2.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
30 is a term because (2*3*5) - 1 = 29 and (2*3*5) + 1 = 31.
42 is a term because (2*3*7) - 1 = 41 and (2*3*7) + 1 = 43.
66 is a term because (2*3*11) + 1 = 67.
70 is a term because (2*5*7) + 1 = 71.
MAPLE
Res:= NULL: count:= 0: last:= 0: p:= 3;
while count < 100 do
p:= nextprime(p);
if p mod 4 = 3 then
if p-1 <> last then
F:= ifactors(p-1)[2];
if nops(F) = 3 and {F[1, 2], F[2, 2], F[3, 2]}={1} then
Res:= Res, p-1;
count:= count+1;
fi fi
else
F:= ifactors(p+1)[2];
last:= p+1;
if nops(F) = 3 and {F[1, 2], F[2, 2], F[3, 2]}={1} then
Res:= Res, p+1;
count:= count+1;
fi
fi
od:
Res; # Robert Israel, Feb 17 2019
MATHEMATICA
Select[Range[2, 10^3, 4], And[AnyTrue[# + {-1, 1}, PrimeQ], SquareFreeQ@ #, PrimeNu@ # == 3] &] (* Michael De Vlieger, Jan 29 2019 *)
PROG
(PARI) lista(nn) = for(n=1, nn, if(bigomega(n)==3 && omega(n)==3 && (isprime(n-1) || isprime(n+1)), print1(n", "))); \\ Michel Marcus, Jan 30 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Torlach Rush, Jan 29 2019
EXTENSIONS
Corrected and extended by Michel Marcus, Jan 30 2019
STATUS
approved