OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..500
EXAMPLE
a(3) = 72 because A001414(72) = 12 and there are 3 pairs: (5,67), (11,61) and (31,41) where 5+67 = 11+61 = 31+41 = 72 and 5, 5+12 = 17, 67, 67+12 = 79, 11, 11+12 = 23, 61, 61+12 = 73, 31, 31+12 = 43, 41, and 41+12 = 53 are all prime; and this is the first even number with 3 such pairs.
MAPLE
sp:= proc(n) local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
f:= proc(n) local s, p, q, count;
s:= sp(n);
if s::odd then return 0 fi;
p:= 2; count:= 0;
do
p:= nextprime(p);
q:= n-p;
if p > q then return count fi;
if isprime(p+s) and isprime(q) and isprime(q+s) then count:= count+1 fi;
od;
end proc:
V:= Array(0..60): count:= 0:
for n from 2 by 2 while count < 61 do
v:= f(n);
if v <= 60 and V[v] = 0 then V[v]:= n; count:= count+1; fi
od:
convert(V, list);
MATHEMATICA
a[n_] := Block[{k=2, s}, While[True, s = Plus @@ Times @@@ FactorInteger@ k; If[n == Length@ Select[ Prime@ Range@ PrimePi[k/2], And @@ PrimeQ@ {k-#, #+s, k-#+s} &], Break[]]; k += 2]; k]; a /@ Range[0, 20] (* Giovanni Resta, Oct 24 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Oct 13 2022
STATUS
approved