1

Well, we have $x_1 + x_2 + x_3 + x_4 = r$ where $x_i\in\{-3,-2,-1,0,1,2,3\}$

Then the generating function is given by $f(x)=(x^{-3}+x^{-2}+x^{-1}+x^{0}+x^1+x^2+x^3)^4 = \frac{(x^{6}+x^{5}+x^{4}+x^{3}+x^2+x^1+x^0)^4}{(x^3)^4}=\frac{(x^{6}+x^{5}+x^{4}+x^{3}+x^2+x^1+x^0)^4}{x^{12}}= (x^{6}+x^{5}+x^{4}+x^{3}+x^2+x^1+x^0)^4x^{-12}= (\frac{(1-x^{7})}{(1-x)})^4x^{-12} $

Then

$(1-x^{7})^4=1-4x^7+6x^{14}-4x^{21}+x^{28}$

And

$(1-x)^{-4}=\sum_{r=0}^\infty \binom{-4}{r}x^r(-1)^{r}$

So

$\binom{-4}{r}-4 \binom{-4}{r-7}+6 \binom{-4}{r-14}-4 \binom{-4}{r-21}+ \binom{-4}{r-28}=\binom{r+4-1}{r}-4 \binom{r+4-1}{r-7}+6 \binom{r+4-1}{r-14}-4 \binom{r+4-1}{r-21}+ \binom{r+4-1}{r-28}=\binom{r+3}{r}-4 \binom{r+3}{r-7}+6 \binom{r+3}{r-14}-4 \binom{r+3}{r-21}+ \binom{r+3}{r-28}$

So this is what I did. Is correct? Shouldn't I be able to get to a number?

Gabriel
  • 41

1 Answers1

1

First you need to know why generating function works, and why negative integers have a problem.

https://brilliant.org/wiki/generating-functions-solving-recurrence-relations/#:~:text=Generating%20Functions,in%20a%20sequence%20of%20numbers&text=an.,used%20for%20solving%20recurrence%20relations.

So your generating function is wrong. Each power of $x$ represents the number of times the object is being taken, hence $1$ or $x^0$ means that the the object is not taken.

since the values are negative, we have to take the powers negative too.

Let's take only two variables and $r=0$ Listing out all the possible cases, $$\{ (-3,3), (-2,2), (-1,1), (0,0), (1,-1), (2,-2), (3,-3)\}$$ i.e. $7$

Our function will be, $$\left[\dfrac{1-x^7}{x^3(1-x)}\right]^2$$ And the constant term here is 7 By, https://www.wolframalpha.com/input/?i=Series+%28%281-x%5E7%29%2F%28x%5E%283%29%281-x%29%29%29%5E2

UmbQbify
  • 889