OFFSET
1,10
COMMENTS
p=q is allowed.
It is conjectured that the primes p, q in A274987 (a subset of all primes) are sufficient to decomposite all numbers into p and c*q (c=1 when n is even, 2 when c is odd) when n > 2551.
This sequence provides a very tight alternative of the Goldbach conjecture for all positive integers, in which indices of zero terms form a complete sequence {1, 2, 3, 4, 5, 7, 32, 52, 55, 61, 128, 194, 214, 244, 292, 334, 388, 782, 902, 992, 1414, 1571, 1712, 1916, 2551}.
There are no more zero terms of a(n) up to n = 100000.
LINKS
Lei Zhou, Table of n, a(n) for n = 1..10000
Lei Zhou, List plot of the first 10000 terms of a(n).
EXAMPLE
A274987 = {3, 5, 7, 11, 13, 17, 23, 31, 37, 53, 59, 61, 73, 79, 83, 89, 101, 103, 109, ...}
For n=6, 6 = 3+3, one case of decomposition, so a(6)=1;
For n=7, 7 < 3+2*3=9, no eligible case could be found, so a(7)=0;
...
For n=17, 17 = 3+2*7 = 7+2*5 = 11+2*3, three cases of decompositions, so a(17)=3.
MATHEMATICA
p = 3; sp = {p}; Table[l = Length[sp]; While[sp[[l]] < n, While[p = NextPrime[p]; cp = 2*3^(Floor[Log[3, 2*p - 1]]) - p; ! PrimeQ[cp]]; AppendTo[sp, p]; l++]; c = 2 - Mod[n + 1, 2]; ct = 0; Do[If[MemberQ[sp, n - c*sp[[i]]], If[c == 1, If[(2*sp[[i]]) <= n, ct++], ct++]], {i, 1, l}]; ct, {n, 1, 87}]
CROSSREFS
KEYWORD
AUTHOR
Lei Zhou, Nov 11 2016
STATUS
approved