Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Number of combinations of integers \leq n which sum to n

  1. Jul 19, 2011 #1
    Hi all,
    I'm new to the forum, this is my problem:

    given a positive integer n, i want to find how many combinations of integers smaller than n but larger than 0 sum to n. E.g.

    n=3:
    {3},{2,1},{1,1,1}

    n=4:
    {4},{3,1},{2,2},{2,1,1},{1,1,1}

    it might just be that i'm tired, but i've been thinking about this for a while.

    Thank you very much!
     
  2. jcsd
  3. Jul 19, 2011 #2
    http://en.wikipedia.org/wiki/Partition_%28number_theory%29" [Broken].
     
    Last edited by a moderator: May 5, 2017
  4. Jul 24, 2011 #3
    Thank you very much!
    Perfect!
     
    Last edited by a moderator: May 5, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Number of combinations of integers \leq n which sum to n
Loading...