We can't compare this problem with numbers because in case of numbers we have multiple choices for a place( but we can't place more than one no. in one place).

We compare this problem with--

No. of ways of distributing n **identical** things among k people=$^{n+k-1}C_{k-1}$ (a person(shelve) may get 0 things)

Here difference is n books are **distinct.**