A357816 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.
2, 16, 60, 72, 220, 132, 374, 276, 492, 638, 636, 852, 620, 854, 996, 1056, 1026, 1212, 2070, 1530, 2610, 3976, 3844, 1488, 1572, 4812, 4770, 3942, 2484, 5028, 3234, 4668, 6036, 3276, 5172, 5532, 6756, 2730, 6084, 4230, 6390, 9132, 14134, 4620, 9674, 10692, 6600, 8910, 10836, 12204, 18852, 9660
Offset: 0
Keywords
Examples
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.
Links
- Robert Israel, Table of n, a(n) for n = 0..500
Programs
-
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 *)