Questions tagged [generating-functions]

Generating functions are formed by making a series $\sum_{n\geq 0} a_n x^n$ out of a sequence $a_n$. They are used to count objects in enumerative combinatorics.

A generating function is a formal power series of the form \begin{equation*} f(x)=\sum^{\infty}_{n=0}a_nx^n \end{equation*} whose coefficients contain information about $a_n$, the sequence of numbers. For instance, suppose that the sequence is the Fibonacci sequence $0,1,1,2,3,5,8,\ldots$ Then$$f(x)=x+x^2+2x^3+3x^4+5x^5+\cdots,$$$$xf(x)=x^2+x^3+2x^4+3x^5+\cdots,$$and$$x^2f(x)=x^3+x^4+2x^5+\cdots.$$Then, it follows from the definition of the Fibonacci sequence that$$(1-x-x^2)f(x)=x$$This fact can be used to prove properties of the sequence, such as that its $n^\text{th}$ term is$$F_n = \frac{\varphi^n-(-\varphi)^{-n}}{\sqrt5},$$where $\varphi$ is the golden ratio.

4469 questions
1
vote
0 answers

Find closed form of generating function

Find a closed form of the generating function $$ y = x + \frac 23 x^3 + \frac 23 \frac 45 x^5 + \frac 23 \frac 45 \frac 67 x^7 + \cdots$$ I realized that $$y = (x+x^3+\cdots) - \frac 13 (x^3+x^5+\cdots) - \frac 23 \frac 15 (x^5+\cdots) -…
Kai Wang
  • 713
1
vote
1 answer

How to find a certain coefficient from a series that is given by a generating function of two variables?

How to find the coefficient of $x^1y^3$ from the series that is given by the $\frac{x y}{(y-1) (x+y-2)}$? The coefficient is according to Wolfram Mathematica $\text{SeriesCoefficient}\left[\frac{x y}{(y-1) (x+y-2)},\{x,0,1\},\{y,0,3…
ockin
  • 13
1
vote
3 answers

Not sure how to apply generating functions

I am trying to find the generating function $A(x)$ $[x^n]A(x) = \sum_{a+b+c=n \\ a,b,c \geq 0 \\ a,b,c \in \mathbb{Z}}\frac{a^2b}{c}$ My initial thoughts are that the 3 variables can be their own series and can have their own generating functions,…
1
vote
3 answers

How to find the coefficient without a calculator?

I wanted to solve this question without using a calculator. Question: The number of non-negative integer solutions to $$3x+y+z=24$$ By creating generating functions you have to find the coefficient of $x^{24}$ in the expression:…
1
vote
0 answers

Exponential Generating Function for $\frac{1}{2-\tan{x}-\sec{x}}$?

I'm interested in finding a nice exponential generating function, $g$, for $$\frac{1}{2-\tan{x}-\sec{x}}.$$ The sequence listed over here on OEIS is actually... very nasty and hard to compute. Surely, this cannot be the best possible EGF out there?…
Arkyter
  • 85
1
vote
1 answer

Ways of Changing 85/90 dollars

The number of ways of changing 85 dollars with 1,5,10 and 20 dollar bills should be the coefficient of $x^{85}$ in $(1+x+x^2+\ldots+x^{85})(1+x^5+\ldots+x^{85})(1+x^{10}+\ldots+x^{80})(1+x^{20}+\ldots+x^{80})$, that is,…
1
vote
1 answer

How do I find the generating function for the sequence $-2, 4, -8, 16, -32, 64, ...$

I am trying to find the generating function for the sequence: $-2, 4, -8, 16, -32, 64, ...$ and I am not sure what the answer is. I have colleagues who are saying that $g(x) = \frac{1}{(1+2x)}$ is the correct answer but based on my work below I…
NoName123
  • 407
1
vote
1 answer

Solving recursive sequence using generating functions in a different way

The problem: Suppose we have the following recursive series \begin{cases} a_{1}=0 & \\ a_{n+1} = 8a_{n} + 9 \cdot 10^{n-1}, & n \geq 1 \end{cases} and we wish to find an explicit expression (formula) for $a_{n}$ using generating…
NoName123
  • 407
1
vote
0 answers

Given sequences $a_n$, $b_n$, $c_n=a_n b_n$, can you generally express a generating function of $c_n$ in terms of GF's of $a_n$ and $b_n$?

Given the sequences $a_n$, $b_n$ and $c_n=a_n b_n$. Let $F(x) =\sum a_n x^n$, $G(x) =\sum b_n x^n$, $H(x) =\sum c_n x^n$ be the formal power series of the given sequences. Can you generally express $H(x)$ as function of $F(x)$ and $G(x)$? What would…
MennoK
  • 287
1
vote
0 answers

OGF of the numerator

I am interested in finding the ordinary generating function of the numerator in the sum $$\sum_{n = 1}^{\infty}\frac{(-1)^{n+1}}{n^{4m + 3}}$$ I have tried this problem for quite considerable amount of time. After spending some time I was able to…
1
vote
2 answers

How to represent $ \frac{1}{a_n}$ in terms of the generating function of $a_n$?

Suppose I have the ordinary generating function of $a_n$, $$ A(x) = \sum_{i} a_i x^i$$ Then from the above expression, is there a way to write the generating function of $\frac{1}{a_n}$? If there is a way to do it using exponential generating…
1
vote
1 answer

Find $a_0$ and $a_1$ when given a generating function.

The recursive sequence $a_n$ has the following generating function $$\begin{align} &f(x)={\frac{x}{1-2x}+{\frac{4}{1+3x}}} \end{align}$$ I am to find $a_0$ and $a_1$: Rule: ${\frac{1}{1-a}}=1+a+a^2+a^3+...+a^n$ So we…
Mampenda
  • 409
1
vote
1 answer

Find a function for well form brackets using generating functions

How to find a function for calculating the number of well form brackets (for "n" pairs of brackets) using generating function? This is a probably a routine problem for some people, but I haven't got any resource on generating function.
Mark
  • 3,109
1
vote
1 answer

Solving recurrence equation using generating functions

$$a_{0} = 0, a_{1} = 1, a_{2} = 2, a_{3} = 6$$ $$a_{n} = a_{n+3} - a_{n+2}$$ $\sum = a_{n}x^{n}$ $A(x) = \frac{A(X) - x - 2x^{2}}{x^{3}} - \frac{A(x) - x}{x^{2}}$ $A(x) = \frac{x^{3} + x - 1}{-x^{2} - x}$ Is this the correct solution? The answer is…
khernik
  • 1,369
1
vote
1 answer

Is the series $\sum_1^\infty \frac{q^n}{1+q^{2n}}$ the generating function of the sequence A002654?

Is the series $\sum_1^\infty \frac{q^n}{1+q^{2n}}$ the generating function of the sequence A002654 (Number of ways of writing n as a sum of at most two nonzero squares, where order matters; also (number of divisors of n of form 4m+1) - (number of…
2132123
  • 1,565