OFFSET
1,1
COMMENTS
(Conjecture) Every number n > 17 is the sum of 3 distinct primes. Natural numbers that are not the sum of 3 distinct primes are listed in A124868.
A125688(a(n)) > 0. - Reinhard Zumkeller, Nov 30 2006
LINKS
Eric W. Weisstein, Goldbach conjecture
Wikipedia, Goldbach's conjecture
Wikipedia, Goldbach's weak conjecture
EXAMPLE
The first three primes are 2, 3, 5, and 2 + 3 + 5 = 10, so 10 is in the sequence. No smaller integer is in the sequence.
5 + 5 + 5 = 15, but note also 3 + 5 + 7 = 15, so 15 is in the sequence.
Although 13 = 3 + 3 + 7 = 3 + 5 + 5, both of those repeat primes, so 13 is not in the sequence.
MATHEMATICA
threePrimes[n_] := Module[{p, q, r}, {p, q, r} /. Solve[n == p + q + r && p < q < r, {p, q, r}, Primes]];
Reap[For[n = 10, n <= 100, n++, sol = threePrimes[n]; If[MatchQ[sol, {{_, _, _}..}], Print[n, " ", sol[[1]]]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Apr 26 2020 *)
has3DistPrimesPart[n_] := Length[Select[IntegerPartitions[n, {3}], Length[Union[#]] == 3 && Union[PrimeQ[#]] == {True} &]] > 0; Select[Range[100], has3DistPrimesPart] (* Alonso del Arte, Apr 26 2020 *)
Union[Total/@Subsets[Prime[Range[20]], {3}]] (* Harvey P. Dale, Feb 06 2024 *)
PROG
(PARI) a(n)=if(n>5, n+12, [10, 12, 14, 15, 16][n]) \\ Charles R Greathouse IV, Aug 26 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alexander Adamchuk, Nov 11 2006
STATUS
approved