In How many ways can a 25 Identical books can be placed in 5 identical boxes.
I know the process by counting but that is too lengthy . I want different approach by which I can easily calculate required number in Exam hall in few minutes.
Process of Counting : This problem can be taken partitions of 25 into 5 parts.
25 = 25+0+0+0+0
25 = 24 +1 + 0 + 0 +0
25 = 23+ 1 +1 +0 + 0 ... .... Like this way many combinations are made.: about 377
How can we calculate it without this process of manual counting.
The answer of Foobaz John defined $p_k$ and $p_{\le k}$.
Notice first of all that $p_{\le k}(n)=p_k(n+k)$. (That's because we can add one object to each part to ensure that there are no parts of size zero.) Thus, while we must be careful to distinguish them, the tables for these two functions are very similar.
Let's write down the table for $p_k(n)$ up to $k=5$.
The column for $k=1$ is identically $1$, so we can omit it. The column for $k=2$ can be filled in with $\lfloor\tfrac12n\rfloor$; after that, we use the recurrence $p_k(n)=p_{k-1}(n-1)+p_k(n-k)$ to get: $$\begin{array}{|c|cccc|}\hline&2&3&4&5\\\hline2&1\\3&1&1\\4&2&1&1\\5&2&2&1&1\\6&3&3&2&1\\\vdots&\vdots&\vdots&\vdots&\vdots\end{array}$$ With practice, the table can be continued fairly rapidly, but it will take a few minutes to get to row $25$, and any error will propagate. An exam ought not to contain such a problem, unless the numbers are very small. However, formulas do exist. I won't attempt to prove them.
$$\begin{align*}p_2(n)&=\lfloor\tfrac12n\rfloor\\ p_3(n)&=[\tfrac1{12}n^2]\\ p_4(n)&=[\tfrac1{144}(n^3+3n^2\underbrace{-9n}_{\text{if }n\text{ odd}})]\end{align*}$$ In the second and third formulas, $[\ldots]$ signifies the nearest integer.
The equivalent formula for $k=5$ is $$p_5(n)=[\tfrac1{2880}(n^4+10n^3+10n^2-75n-45n(-1)^n)]$$
However, rather than memorize this, we could use the recurrence together with an earlier formula.
$$\begin{align*}p_{\le 5}(25)=p_5(30)&=p_4(29)+p_4(24)+p_4(19)+p_4(14)+p_4(9)+p_4(4)\\&=185+108+54+23+6+1\\&=377\end{align*}$$