login
A240697
The smallest p2-p1 when 2n = p1+p4 = p2+p3, where p1 < p2 <= p3 < p4 are prime numbers.
1
0, 0, 0, 0, 2, 0, 4, 2, 2, 4, 2, 2, 4, 6, 2, 10, 2, 2, 12, 6, 2, 4, 2, 2, 4, 6, 2, 6, 6, 2, 12, 2, 2, 24, 6, 2, 4, 2, 2, 6, 6, 2, 4, 12, 2, 6, 6, 4, 6, 6, 2, 4, 2, 2, 4, 2, 2, 4, 6, 2, 6, 6, 2, 12, 6, 2, 4, 6, 2, 6, 2, 2, 6, 6, 2, 10, 2, 2, 12, 6, 2, 6, 6, 2, 4
OFFSET
1,5
COMMENTS
a(n) is defined as 0 when 2n cannot be written as the sum of two prime numbers in two or more distinct ways.
Note that there are only two values of this sequence that are greater than 12 for n<=10000, which are a(34)=24 and a(229)=18.
From testing up to n=300000, it appears that only limited terms take a value other than 2, 4, or 6. Here is a list:
a(n) = 0 for n = 1, 2, 3, 4, and 6;
a(n) = 10 for n = 16, 76, and 181;
a(n) = 12 for n = 19, 31, 44, 64, 79, 86, 124, 139, 259, 269, 274, 314, 391, 404, 484, 499, 604, 619, 691, 709, 859, 1054, 1129, 1399, 1469, 1559, 1574, 2729, 4006, and 5804;
a(229) = 18; and a(34) = 24.
Conjecture: except for those listed above, no terms in this sequence take a value other than 2, 4, or 6.
EXAMPLE
When n<5, 2n cannot be written as the sum of two prime numbers in two distinct ways, so a(1) = a(2) = a(3) = a(4) = 0.
When n=5, 2n=10 = 3+7 = 5+5, 5-3=2, so a(5)=2.
...
When n=18, 2n=36 = 5+31 = 7+29 = 13+23 = 17+19. The smallest difference among the four numbers {5,7,13,17} is 2 = 7-5. So a(18)=2.
MATHEMATICA
Table[p = 2; While[! PrimeQ[2*n - p], p = NextPrime[p]]; p1 = p; c = 2*n; While[p1 = NextPrime[p1]; (2*p1) <= 2*n, If[PrimeQ[2*n - p1], c = Min[c, p1 - p]; p = p1]]; If[c == 2*n, c = 0]; c, {n, 1, 85}]
CROSSREFS
Sequence in context: A383970 A037035 A159984 * A271230 A112824 A195133
KEYWORD
nonn,easy
AUTHOR
Lei Zhou, Apr 10 2014
STATUS
approved