login
Even numbers with a Goldbach partition (p,q), p < q, such that p and q can be written as the sum of two primes.
4

%I #18 Jun 28 2026 15:48:16

%S 12,18,20,24,26,32,36,38,44,48,50,56,62,66,68,74,78,80,86,92,104,108,

%T 110,114,116,122,128,134,140,144,146,152,156,158,164,170,176,182,186,

%U 188,194,198,200,204,206,212,218,224,230,234,236,242,246,248,254,260,266

%N Even numbers with a Goldbach partition (p,q), p < q, such that p and q can be written as the sum of two primes.

%C All terms == 0 or 2 (mod 6). Those == 0 (mod 6) are 5 + A006512(k) for k > 1. - _Robert Israel_, May 28 2026

%H Robert Israel, <a href="/A334160/b334160.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GoldbachPartition.html">Goldbach Partition</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Goldbach%27s_conjecture">Goldbach's conjecture</a>

%H <a href="/index/Go#Goldbach">Index entries for sequences related to Goldbach conjecture</a>

%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>

%e 12 is in the sequence since 12 = 7 + 5 (distinct primes), 7 = 5 + 2 (both prime) and 5 = 3 + 2 (both prime).

%e 18 is in the sequence since 18 = 13 + 5 (distinct primes), 13 = 11 + 2 (both prime) and 5 = 3 + 2 (both prime).

%p N:= 500: # for terms <= N

%p P:= select(t -> isprime(t) and isprime(t-2), [5,seq(i,i=7..N,6)]):

%p sort(convert(select(`<=`,{seq(seq(P[i]+P[j],i=1..j-1),j=1..nops(P))},N),list)); # _Robert Israel_, May 28 2026

%t Table[If[Sum[(PrimePi[i - 2] - PrimePi[i - 3]) (PrimePi[2 n - i - 2] - PrimePi[2 n - i - 3]) (PrimePi[i] - PrimePi[i - 1]) (PrimePi[2 n - i] - PrimePi[2 n - i - 1]), {i, n - 1}] > 0, 2 n, {}], {n, 150}] // Flatten

%Y Cf. A006512, A396487.

%K nonn,easy

%O 1,1

%A _Wesley Ivan Hurt_, Apr 16 2020