|
|
A202472
|
|
Goldbach's Problem extended to subtraction: number of decompositions of 2n into unordered differences of two primes, p, q, where p < 2n < q.
|
|
4
|
|
|
0, 1, 1, 2, 2, 3, 2, 3, 3, 3, 2, 6, 4, 3, 6, 3, 4, 6, 4, 5, 8, 4, 4, 7, 6, 4, 9, 8, 4, 11, 5, 5, 11, 6, 8, 9, 4, 7, 11, 7, 4, 13, 7, 5, 15, 7, 8, 13, 8, 9, 11, 7, 7, 13, 10, 5, 13, 7, 7, 19, 9, 8, 17, 9, 10, 16, 9, 9, 15, 12, 7, 19, 9, 7, 19, 9, 12, 17, 8, 14
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
LINKS
|
|
|
MATHEMATICA
|
Table[Length[Select[Prime[Range[PrimePi[2*n]]], PrimeQ[2*n + #] &]], {n, 100}] (* T. D. Noe, Apr 16 2013 *)
|
|
PROG
|
(C++)
#include <iostream>
using namespace std;
int main()
{ int p[25] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97};
int count, istart = 2;
for(int n=1; n<=25; n++)
{
if(2*n>p[istart]) istart++;
count = 0;
for(int j=1; p[j]<2*n; j++)
for(int i=istart; p[i]-p[j]<=2*n; i++)
if(p[i]-p[j]==2*n) count++;
cout << n << ". " << count << endl;
}
return 0;
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|