Number of solutions of this equation *. The number of solutions of the equation $a+2b=k$ is $\left\lfloor\frac{k}{2}\right\rfloor+1,$ where $a,b\in \mathbb{N}\cup\{0\}\mbox{ and fixed }k\in\mathbb{N}.$ More general what is the number of solutions of the equation $a_{1}+2a_{2}+3a_{3}+\ldots+(r-1)a_{r-1}+ra_{r}=k,$ where $a_{i}\in\mathbb{N}\cup\{0\}\quad 1\leq i\leq r \mbox{ and fixed }k\in\mathbb{N}?$ 

The number of solutions of $\sum_{i=1}^r ia_i=k$ in the nonnegative integers is equal to the number of integer partitions of $k$ whose parts all have size at most $r$. The numbers $a_i$ represent the number of parts of size $i$. 
The number of such partitions is sometimes denoted $p_{\le r}(k)$. There is no closed form for this $p_{\le r}(k)$. It can be shown using Schur's theorem that asymptotically,
$$
p_{\le r}(k)\sim \frac{k^{r-1}}{r!(r-1)!}\qquad \text{as }{k\to\infty}.
$$
