login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A176876
Numbers that are the product of two distinct primes a and b, such that a^3+b^3 is the average of a twin prime pair.
5
143, 215, 341, 485, 515, 551, 713, 1133, 1241, 1271, 1541, 1865, 2183, 2315, 2501, 3173, 3215, 3503, 3713, 4031, 4661, 5465, 5633, 6431, 6485, 7313, 7361, 7571, 8201, 8471, 9353, 9599, 9713, 9893, 12083, 12371, 12443, 12449, 13361, 13631, 14711
OFFSET
1,1
COMMENTS
All terms == 5 (mod 6). - Robert Israel, Apr 09 2019
LINKS
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
STATUS
approved