A294185 Number of distinct lesser twin primes which are in Goldbach partitions of 2n.
0, 0, 1, 2, 2, 1, 2, 3, 2, 2, 4, 3, 1, 3, 2, 2, 5, 3, 0, 4, 3, 2, 5, 5, 1, 4, 3, 1, 5, 3, 2, 6, 3, 0, 6, 5, 2, 6, 6, 0, 6, 5, 1, 6, 5, 1, 4, 3, 0, 7, 5, 2, 5, 6, 2, 9, 7, 1, 8, 6, 0, 6, 4, 0, 8, 5, 1, 3, 7, 2, 9, 7, 0, 7, 5, 2, 9, 6, 0, 9, 5, 0, 7, 11, 1, 6, 6, 1
Offset: 1
Keywords
Examples
a(5) = 2 because 2*5=10 has two ordered Goldbach partitions: 3+7 and 5+5. 3 is a lesser twin prime (because 3 and 5 are twin primes), 5 is a lesser twin prime (because 5 and 7 are twin primes).
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..10000
- Marcin Barylski, Plot of first 20000 elements of the A294185
- Marcin Barylski, C++ program for generating A294185
- Tomas Oliveira e Silva, Goldbach conjecture verification
Crossrefs
Programs
-
Mathematica
a[n_] := Block[{c = 0, p = 3, lst = {}}, While[p < n + 1, If[ PrimeQ[2n - p], AppendTo[lst, {p, 2n - p}]]; p = NextPrime@p]; Length@Select[Union@ Flatten@ lst, PrimeQ[# + 2] &]]; Array[a, 88] (* Robert G. Wilson v, Jul 24 2018 *)
-
PARI
isltwin(p) = isprime(p) && isprime(p+2); a(n) = {vtp = []; forprime(p = 2, n, if (isprime(2*n-p), if (isltwin(p), vtp = concat(vtp, p)); if (isltwin(2*n-p), vtp = concat(vtp, 2*n-p)););); #Set(vtp);} \\ Michel Marcus, Mar 01 2018
Comments