How do I find the number of ways to represent a number as a sum of only $1$’s and $2$’s and $3$’s?
I think the title is self-explanatory.
E.g., if I have to represent $13$ as a sum of only $1$'s and $2$'s, or $1$'s, $2$'s and $3$'s, what will the formula for finding the number of unordered ways this can be done, i.e., $2 + 2 + 1 = 2 + 1 + 2$?
I'm sorry if this is an easy question, but it's been a long time since I used any permutations and combinations, and it's all hazy.
P.S. Can you tell me a good online resource to brush up advanced permutations and combinations?
This is done very nicely on pages 57 to 58 of Andrews and Eriksson, Integer Partitions, published by Cambridge University Press in 2004. As J. M. says in the comments, one wants the series expansion of $${1\over(1-x)(1-x^2)(1-x^3)}$$ The 1st-year Calculus partial fractions approach will get you there, but Andrews and Eriksson give a slightly different partial fractions decomposition, namely, $${1/6\over(1-x)^3}+{1/4\over(1-x)^2}+{1/4\over1-x^2}+{1/3\over1-x^3}$$ and from that they get a very simple formula for the number of partitions of $n$ into parts not exceeding 3.