I recently heard about partitions. I tried to count them using the following technique:
1) Ways to write $5$ as a sum of five positive integers:
$$1+1+1+1+1$$
2) Number of ways to write $5$ a sum of four positive integer:
$$2+1+1+1$$
3) Ways to write $5$ as a sum of three positive integers:
$$3+1+1$$
$$2+2+1$$
4) Ways to write $5$ as a sum of two positive integers:
$$4+1$$
$$3+2$$
5) Finally, ways to write $5$ as a sum of one number:
$$5$$
So, there are seven different ways to write $5$ as a sum of positive integers. Which is correct. But if I continue to use this technique for higher numbers I do not get the correct answer. For example if I do it for 6.
1) Ways to write $6$ as a sum of six positive integers:
$$1+1+1+1+1+1$$
2) Ways to write $6$ as a sum of five positive integers:
$$2+1+1+1+1$$
3) Ways to write $6$ a sum of four positive integer:
$$3+1+1+1$$
$$2+2+1+1$$
3) Ways to write $6$ as a sum of three positive integers:
$$4+1+1$$
$$3+2+1$$
4) Ways to write $6$ as a sum of two positive integers:
$$5+1$$
$$4+2$$
$$3+3$$
5) Finally, ways to write $6$ as a sum of one number:
$$6$$
The answer that I got is $10$ but the actual partitions according to wolfram alpha is $11$. My question is, what did I miss? Because as I increase the number the error becomes larger and larger.
If you are interested in partitions, then I would suggest you to study the concept further by studying about Ramanujan. S Ramanujan researched heavily in the topic which would help you. Though, there is no such direct way but still you would get a lot of insight. Hope it helps.