I want to calculate the amount of n digit numbers with sum s.(adsbygoogle = window.adsbygoogle || []).push({});

The idea was the number of ways to put s balls in n boxes. So there are C(n+s-1,n-1) ways to do that when n>1 and s<10. But this formula doesn't work when s>10.

I found a formula C(10n-s-1,n-1) that works for cases where s>=10 but I can't figure out how its obtained.

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# N digit numbers with sum s

Loading...

Similar Threads - digit numbers | Date |
---|---|

B Prime Factorization of 5-Digit Numbers | May 29, 2017 |

Predict Digits of Irrational Numbers with Modular Arithmetic Summation? | Nov 5, 2015 |

10-adic number proof: A^10 has the same n+1 last digits as 1 | Oct 24, 2015 |

Challenge 24: 7-digit numbers | Dec 16, 2014 |

How do I multiply 3 three digit numbers simultaneously? | Sep 5, 2014 |

**Physics Forums - The Fusion of Science and Community**