Making 12 by adding 1, 3, and 5 It is given 3 numbers : 1, 3, and 5, you were told to write numbers by adding those 3 numbers, for example:
There are 8 ways of writing the number 6
6 = 1 + 5
6 = 5 + 1
6 = 3 + 3
6 = 1 + 1 + 1 + 3
6 = 1 + 1 + 3 + 1
6 = 1 + 3 + 1 + 1
6 = 3 + 1 + 1 + 1
6 = 1 + 1 + 1 + 1 + 1 + 1
How many ways are there to write the number 12.
The problem is, I need to finish it quick. I can do it manually, but it'll take some time. Can anybody help me? Just giving hints would help a lot! Thanks

There are three distinct ways to write 12 as the sum of 1s, 3s and 5s:
1) Write 11 as the sum of 1s 3s and 5s and then add an extra 1
2) Write 9 as the sum of 1s, 3s and 5s and then add an extra 3
3) Write 7 as the sum of 1s, 3s and 5s and then add an extra 5
So if $f(n)$ is the number of ways of writing $n$ as the sum of 1s, 3s and 5s then we have
$f(12) = f(11) + f(9) + f(7)$
But by a similar argument we know that $f(11) = f(10) + f(8) + f(6)$. So
$f(12) = f(11) + f(9) + f(7) \\=f(10)+f(9)+f(8)+f(7)+f(6) \\=2f(9)+f(8)+2f(7)+f(6)+f(5) \\=3f(8)+2f(7)+3f(6)+f(5)+2f(4) \dots$
