Let imagine 2 2| 2 | |2 2 2|.......2 be x1|x2|.........|x10

because xi can be 0 then we can have xi=ai+1 in order to the dividers make sense.

x1+x2+.....+x10=n

If (a1,a2,......ar) is a solution then (a1+1,a2+1,.........,ar+1) is a solution to that problem with n replaced by n+r (since a1+1+a2+1+...+ar+1=n+r).

Like Soroban has explained: we have total: (n+r-1|r-1). In this case: (25+10-1|10-1)=(34|9).

These 2 formular (n-1|r-1) for the positive integers and (n+r-1|r-1) for non-negative integers are also written in some books. Ex

age 13, book: " A First Course in Probability" 7. edition of Sheldon Ross