OFFSET
4,1
COMMENTS
Goldbach's weak (ternary) conjecture states that every odd number > 5 can be expressed as the sum of three primes (see link). This sequence applies the conjecture (now proved) to primes > 5. From all possible partitions of prime(n) = p+q+r for primes p,q,r (p <= q <= r), a(n) is chosen to be the maximum possible value of the least prime p. The sequence is not strictly increasing, and although many primes are repeated, some do not appear at all (e.g., 37 and 47 are not included).
LINKS
EXAMPLE
a(4) refers to prime(4) = 7 = 2+2+3 and since there is no (ordered) partition of 7 starting with a greater prime than 2, a(1)=2.
a(18) refers to prime(18) = 61 = 11+19+31 = 13+17+31 = 19+19+23, from which a(18)=19.
PROG
(PARI) a(n) = {my(pn = prime(n), res = 0); forprime(p=2, pn, forprime(q=p, pn, forprime(r=q, pn, if (p+q+r == pn, res = max(res, p)); ); ); ); res; } \\ Michel Marcus, May 13 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Apr 10 2018
EXTENSIONS
More terms from Michel Marcus, May 13 2018
STATUS
approved