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}?$ 

An attempt may be recursive combinatorics. Let's call $S_{n,k}$ the number of solutions of:
$$\sum_{i=1}^{n} i \ a_i=k$$
Notice that if $a_n=0$, the problem reduces to $S_{n-1,k}$, if $a_n=1$ it reduces to  $S_{n-1,k-n}$, and in general if $a_n=j$, it reduces to $S_{n-1,k-nj}$. Clearly :
$$k-nj>0 \Rightarrow j\leq \lfloor\frac kn\rfloor $$
So in general:
$$S_{n,k}=\sum_{j=0}^{\lfloor \frac kn\rfloor} S_{n-1,k-jn}$$
For example:
$$S_{3,90}=\sum_{j=0}^{30} S_{2,90-3j}$$
For your formula we know that:
$$S_{3,90}=\sum_{j=0}^{30}\lfloor \frac{90-3j}{2}\rfloor+1=31+\sum_{j=0}^{30}\lfloor \frac{90-3j}{2}\rfloor=31+690=721$$
:)
