login
a(n) is the first even number k such that there are exactly n pairs (p,q) where p and q are prime, p<=q, p+q = k, and p+A001414(k) and q+A001414(k) are also prime.
1

%I #9 Oct 24 2022 10:58:04

%S 2,16,60,72,220,132,374,276,492,638,636,852,620,854,996,1056,1026,

%T 1212,2070,1530,2610,3976,3844,1488,1572,4812,4770,3942,2484,5028,

%U 3234,4668,6036,3276,5172,5532,6756,2730,6084,4230,6390,9132,14134,4620,9674,10692,6600,8910,10836,12204,18852,9660

%N a(n) is the first even number k such that there are exactly n pairs (p,q) where p and q are prime, p<=q, p+q = k, and p+A001414(k) and q+A001414(k) are also prime.

%H Robert Israel, <a href="/A357816/b357816.txt">Table of n, a(n) for n = 0..500</a>

%e 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.

%p sp:= proc(n) local t; add(t[1]*t[2],t=ifactors(n)[2]) end proc:

%p f:= proc(n) local s,p,q,count;

%p s:= sp(n);

%p if s::odd then return 0 fi;

%p p:= 2; count:= 0;

%p do

%p p:= nextprime(p);

%p q:= n-p;

%p if p > q then return count fi;

%p if isprime(p+s) and isprime(q) and isprime(q+s) then count:= count+1 fi;

%p od;

%p end proc:

%p V:= Array(0..60): count:= 0:

%p for n from 2 by 2 while count < 61 do

%p v:= f(n);

%p if v <= 60 and V[v] = 0 then V[v]:= n; count:= count+1; fi

%p od:

%p convert(V,list);

%t 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 *)

%Y Cf. A001414, A023036.

%K nonn

%O 0,1

%A _J. M. Bergot_ and _Robert Israel_, Oct 13 2022