text: Q:
  
  Combining an outcome of a score
  
  Hey I was wondering how many are the possibilities of combining the scored points of a result such $133:75$ from a basketball game? Considering that there are fouls($1$ point), normal($2$ points) and threes($3$ points)?
  
  A:
  
  You can do this using generating functions. This is analogous to the classic coin change problem.
  In your case, you want to look at the term for $x^{133}$ in the expansion of
  $$ f(x) = \frac{1}{(1-x^1)(1-x^2)(1-x^3)}.$$
  We may rewrite $f$ as
  $$ f(x) = \frac{1/6}{(1-x)^3} + \frac{1/4}{(1-x)^2} + \frac{17/72}{1-x}
  + \frac{1/8}{1+x} + \frac{-j/9}{x-j} + \frac{-j^2/9}{x-j^2},$$ 
  with $j^2 + j + 1 = 0$. By expanding each fraction $(a-x)^{-d} = a^{-d} (1-x/a)^{-d} = a^{-d} \sum \binom{d}{n} (x/a)^n$, we may obtain an exact formula for the coefficient $a_n$ of $x^n$ in $f$; namely
  $$ a_n = \frac{1}{6} (-1)^n\binom{-3}{n} + \frac{1}{4} (-1)^n\binom{-2}{n} + \frac{17}{72} + \frac{1}{8} (-1)^n + \frac{1}{9} (j^n + j^{2n}).
  $$
  Using this, I find $a_{133} = 1541$ and $a_{75} = 507$.
  
  