Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It is easy to realize that given a natural number N the number of doublets that sum N are $\frac{N+(-1)(N \pmod 2)}{2}$ , so I thought I could reach some recursive formula in the sense that found the number of doublets I could find the number of triplets and so on ..., example: N=3 the only doublet is 2+1=3 -not said yet but 2+1, and 1+2 count as one- then I could count the number of way the number 2 can be expressed as the indicated sum and got the total number of ways 3 can be written as a sum. But this seems not so efficient, so I was wondering if there is other way to attack the problem and if there is some reference to this problem such as if it is well known its used, once I read that this have a chaotic behavior, and also read It was used in probability but don't remember where I got that information. So if you know something I would be grateful to be notice, thanks in advance.

share|cite|improve this question
up vote 8 down vote accepted

This number is known as the partition number, and there has recently been found a "simple" formula by Ken Ono.

share|cite|improve this answer

You are asking about integer partitions. This is a well studied topic and you can look at for details.

share|cite|improve this answer

It is not clear to me whether you want $p_k(N)$, which is the number of ways to write $N$ as a sum of $k$ naturals (order not counting), or whether you want $p(N)$, which is the total number of ways of writing $N$ as a sum of natural numbers (order not counting). Of course, $p(N)$ is just the sum of all the values of $p_k(N)$ for $k=1,2,\dots,N$, so the two concepts are closely related, and both have been subject to a lot of study, but, still, the $p(N)$ question is a lot harder than the $p_k(N)$ question - at least for small $k$ there are simple formulas for $p_k(N)$.

So, what are you after?

share|cite|improve this answer
Hi @Gerry I was after both as I said I wanted to find $p(N)$ suming $p_{k}(N),k\in {1,2,\cdots,N}$ and also relating $p_{k}(N)$ with $p_{k+1}(N)$ but didn't know that this was a BIG problem. – Ivan3.14 Jul 16 '11 at 21:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.