Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

I was solving a combinatorics problem when I encountered difficulties. The problem was:

$x_1 \in \{0,1\}$

$x_2 \in \{0,1,2\}$

. .


We have to find the number of ways we can choose $x_1,x_2..x_{n-1}$ such that


$Given \ k\in\mathbb N \ and \ k\leq \frac{n(n-1)}{2}$

I approached this problem by developing a generating function.


Which solves to


I planned to find the coefficient of $t^k$ in the expression above but i just cannot find a way. I dont know where I am not able to catch the pattern or something. I looked it up, and I stumbled upon q factorials whose definition seemed to be precisely the generating function I have encountered above. My aim remains the same, to calculate the coefficient of $t^k$ in the above generating function, which you may consider to be the coefficient of $q^k$ in the q factorial of $n$, thus effectively solving the original problem. Please help me find the coefficient and if you have an alternative approach to the original problem, that would be welcome! Thanks!

For reference :

share|cite|improve this question – Samuel Jan 13 '13 at 10:15

Your Answer


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

Browse other questions tagged or ask your own question.