Mathematical function $f(n)$ for number of solutions to $3a+4b+5c=n$ What is the explicit function that given an $n$ outputs how many ordered tuples $(a,b,c) \in \mathbb{N}^3$ are a solution to the equation $3a+4b+5c = n$. I'm really stuck with this but I have a strong feeling that the function would be recursive.
 A: As stated in the comments, the number of $(a,b,c)\in\mathbb{N}^3$ such that $3a+4b+5c=n$ is given by the coefficient of $x^n$ in $\frac{1}{(1-x^3)(1-x^4)(1-x^5)}$. This function has a triple pole at $x=1$ and simple poles at $-1$ and at the primitive third, fourth or fifth roots of unity. In particular
$$ [x^n]\frac{1}{(1-x^3)(1-x^4)(1-x^5)} = \frac{(n+4)(n+8)}{120}+ E $$
with $E=E(n)\in(-1,1)$ is a function with period $60$ leading to the following explicit formula:

$ \left|\{(a,b,c)\in\mathbb{N}^3:a+b+c=n\}\right|$ is the closest integer to $\frac{(n+4)(n+8)}{120}$, plus one if $n\pmod{60}$ is either $0,24$ or $48$.

A: You can begin by defining 
$$g(n) := |\{(a,b) \in \mathbb N^2~|~ 3a+4b=n\}| $$
and 
$$h(n) := |\{a\in \mathbb N ~|~3a=n\}|$$ 
You can easily check the following formula :


*

*$h= \mathbf 1_{3\mathbb N} $

*$\forall n\geq 4, g(n)=g(n-4)+h(n)$

*$\forall n\geq 5, f(n)=f(n-5)+g(n)$
Then it's a matter of case analysis depending of congruences modulo 12 for $g$ and then 60 for $f$. 
For instance : 
\begin{eqnarray}
g(12k)&=& \sum_{i=0}^{3k}g(4i)\\
&=& \sum_{i=0}^{3k}g(i)\\
&=& \sum_{j=0}^k g(3j)\\
&=& k
\end{eqnarray}
A: This is only a partial answer:
Every natural number $n\geq 7$ may be written as $$3a+4b+5c=n$$
Too see this, not that every integer is on the form $n=3k+r$, where $r=0,1,2$. Thus, 


*

*If $n=3k\geq 7$, then $(k,0,0)$ is a solution.

*If $n=3k+1\geq 7$, then $(k-1,1,0)$ is a solution.

*If $n=3k+2\geq 7$, then $(k-1,0,1)$ is a solution.

