OFFSET
1,1
COMMENTS
All terms == 5 (mod 6). - Robert Israel, Apr 09 2019
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
143=11*13; 11^3+13^3=3528+-1 -> primes,...
MAPLE
N:= 20000: # to get all terms <= N
P1:= select(isprime, [seq(i, i=7..N/5, 6)]):n1:= nops(P1):
P2:= select(isprime, [seq(i, i=5..N/7, 6)]):n2:= nops(P2):
Res:= NULL:
for i from 1 to n1 do
a:= P1[i];
for j from 1 to n2 do
b:= P2[j];
if a*b > N then break fi;
q:= a^3 + b^3;
if isprime(q-1) and isprime(q+1) then Res:= Res, a*b fi;
od
od:
sort([Res]); # Robert Israel, Apr 09 2019
MATHEMATICA
l[n_]:=Last/@FactorInteger[n]; f[n_]:=First/@FactorInteger[n]; lst={}; Do[If[l[n]=={1, 1}, a=f[n][[1]]; b=f[n][[2]]; If[PrimeQ[a^3+b^3-1]&&PrimeQ[a^3+b^3+1], AppendTo[lst, n]]], {n, 8!}]; lst
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Apr 27 2010
STATUS
approved