# Thread: Help Generating Functions :)

1. ## Help Generating Functions :)

Hey,
I have a question about creating functions:
Given - , that - .

1. I am right that: a0=1, a1=2, a2=2?
2. We need to find numbers - r, s, t, so that - , for all 3≤n. Think of a7 using this formula.

To question 2 I need the start of the solution if possible please
Thanks

2. ## Re: Help Generating Functions :)

$$\dfrac{d}{dx}\left( \dfrac{1}{(1-x)^2} \right) = \dfrac{2}{(1-x)^3}$$

So, we have:

$$\displaystyle \dfrac{1}{(1-x)^3} = \dfrac{1}{2}\sum_{n\ge 0}(n+2)(n+1)x^n$$

This gives:

$$\begin{matrix} & | & 1 & x & x^2 & x^3 & x^4 & \cdots & x^n \\ \hline f(x) & | & a_0 & a_1 & a_2 & a_3 & a_4 & \cdots & a_n \\ 2xf(x) & | & 0 & 2a_0 & 2a_1 & 2a_2 & 2a_3 & \cdots & 2a_{n-1} \\ 2x^2f(x) & | & 0 & 0 & 2a_0 & 2a_1 & 2a_2 & \cdots & 2a_{n-2} \\ x^3f(x) & | & 0 & 0 & 0 & a_0 & a_1 & \cdots & a_{n-3} \\ \hline \text{sum} & | & \dfrac{(2)(1)}{2} & \dfrac{(3)(2)}{2} & \dfrac{(4)(3)}{2} & \dfrac{(5)(4)}{2} & \dfrac{(6)(5)}{2} & \cdots & \dbinom{n+2}{2} \end{matrix}$$

So, we have:

$a_0 = 1$

$a_1 + 2a_0 = a_1+2 = 3$ so $a_1 = 1$

$a_2 + 2a_1 + 2a_0 = a_2 + 4 = 6$, so $a_2 = 2$

In general:

$$a_n + 2 a_{n-1} + 2a_{n-2} + a_{n-3} = \dbinom{n+2}{2}$$

3. ## Re: Help Generating Functions :)

Originally Posted by SlipEternal
$$\dfrac{d}{dx}\left( \dfrac{1}{(1-x)^2} \right) = \dfrac{2}{(1-x)^3}$$

So, we have:

$$\displaystyle \dfrac{1}{(1-x)^3} = \dfrac{1}{2}\sum_{n\ge 0}(n+2)(n+1)x^n$$

This gives:

$$\begin{matrix} & | & 1 & x & x^2 & x^3 & x^4 & \cdots & x^n \\ \hline f(x) & | & a_0 & a_1 & a_2 & a_3 & a_4 & \cdots & a_n \\ 2xf(x) & | & 0 & 2a_0 & 2a_1 & 2a_2 & 2a_3 & \cdots & 2a_{n-1} \\ 2x^2f(x) & | & 0 & 0 & 2a_0 & 2a_1 & 2a_2 & \cdots & 2a_{n-2} \\ x^3f(x) & | & 0 & 0 & 0 & a_0 & a_1 & \cdots & a_{n-3} \\ \hline \text{sum} & | & \dfrac{(2)(1)}{2} & \dfrac{(3)(2)}{2} & \dfrac{(4)(3)}{2} & \dfrac{(5)(4)}{2} & \dfrac{(6)(5)}{2} & \cdots & \dbinom{n+2}{2} \end{matrix}$$

So, we have:

$a_0 = 1$

$a_1 + 2a_0 = a_1+2 = 3$ so $a_1 = 1$

$a_2 + 2a_1 + 2a_0 = a_2 + 4 = 6$, so $a_2 = 2$

In general:

$$a_n + 2 a_{n-1} + 2a_{n-2} + a_{n-3} = \dbinom{n+2}{2}$$

Hi,
First of all thank you for the detailed explanation, so I understand that I made a mistake in a1 ...
And can you give me help with second question?
Thanks

oops...

5. ## Re: Help Generating Functions :)

Originally Posted by yossa
Hi,
First of all thank you for the detailed explanation, so I understand that I made a mistake in a1 ...
And can you give me help with second question?
Thanks
Solve for $a_n$ in the last equation...

6. ## Re: Help Generating Functions :)

Originally Posted by SlipEternal
Solve for $a_n$ in the last equation...
that the solve to equaiton 2?
In general:

$$a_n + 2 a_{n-1} + 2a_{n-2} + a_{n-3} = \dbinom{n+2}{2}$$[/QUOTE]

7. ## Re: Help Generating Functions :)

Originally Posted by yossa
that the solve to equaiton 2?
In general:

$$a_n + 2 a_{n-1} + 2a_{n-2} + a_{n-3} = \dbinom{n+2}{2}$$
[/QUOTE]

Yes, that's it.

8. ## Re: Help Generating Functions :)

Yes, that's it.[/QUOTE]

Ok, only if a little refinement is possible, where do I attach importance here to a7?
and i didnt need 3 numbers?
r,s,t?

9. ## Re: Help Generating Functions :)

I don't know what you mean by "where do I attach importance here to a7".

You are looking for:
$a_n = D(3,n) - ra_{n-1}-sa_{n-2}-ta_{n-3}$.

You have:
$a_n = \dbinom{n+2}{2}-2a_{n-1}-2a_{n-2}-a_{n-3}$.

What are $r,s,t$? I am not sure I understand what $D(3,n)$ is. I assumed it was $D(3,n) = \dbinom{n+2}{2}$.

10. ## Re: Help Generating Functions :)

Originally Posted by SlipEternal
I don't know what you mean by "where do I attach importance here to a7".

You are looking for:
$a_n = D(3,n) - ra_{n-1}-sa_{n-2}-ta_{n-3}$.

You have:
$a_n = \dbinom{n+2}{2}-2a_{n-1}-2a_{n-2}-a_{n-3}$.

What are $r,s,t$? I am not sure I understand what $D(3,n)$ is. I assumed it was $D(3,n) = \dbinom{n+2}{2}$.
Hey friend,
I will try to explain myself more, I need to find three numbers (R, S, T) where the N is greater than or equal to 3, and then calculate A 7 using this formula (here I think it's only a placement and calculation) ...
Hope more sense.
thanks.....

11. ## Re: Help Generating Functions :)

Ok, then

$a_7 = \dbinom{9}{2}-2a_6-2a_5-a_4$
$a_6 = \dbinom{8}{2}-2a_5-2a_4-a_3$
$a_5 = \dbinom{7}{2}-2a_4-2a_3-a_2 = \dbinom{7}{2}-2a_4-2a_3-2$
$a_4 = \dbinom{6}{2}-2a_3-2a_2-a_1 = \dbinom{6}{2}-2a_3-5$
$a_3 = \dbinom{5}{2}-2a_2-2a_1-a_0 = \dbinom{5}{2}-7 = 3$

Plugging back in:
$a_4 = \dbinom{6}{2}-2a_3-5 = 15-6-5 = 4$
$a_5 = \dbinom{7}{2}-2a_4-2a_3-2 = 21-8-6-2 = 5$
$a_6 = \dbinom{8}{2}-2a_5-2a_4-a_3 = 28-10-8-3 = 7$
$a_7 = \dbinom{9}{2}-2a_6-2a_5-a_4 = 36-14-10-4 = 8$