TITLE: Largest prime number $p$ that cannot be written as the sum of three composite numbers?
QUESTION [5 upvotes]: This question is obvious in the sense that prime gaps on average are larger as the numbers go towards infinity.
However, I don't have any idea on how to begin tackling this question apart from very basic trial and error.
Any ideas will be useful. Thanks.

REPLY [5 votes]: Look at the sequence of composite numbers: 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, etc. Just try choosing three of them at random, adding them up and taking note of what happens.
Do the composite numbers have to be distinct? If so, the smallest prime that can be expressed as the sum of three distinct composite numbers is 4 + 6 + 9 = 19. Then, for any $p > 17$, we can just subtract 9 and the problem becomes one of finding two distinct even composite numbers to add up to $p - 9$. The easiest way, I think, is $$\left(\frac{p - 9}{2} - 1\right) + \left(\frac{p - 9}{2} + 1\right).$$
If you don't require the composite numbers to be distinct, then you can also do 9 + 4 + 4 = 17.