GateAI
Combinatorics

GATE CSE 2022 · Q36

MCQ2 marksMedium

Time

Which one of the following is the closed form for the generating function of the sequence {an}n≥0\{ a_n \}_{n \ge 0} defined below? an={n+1,n is odd1,otherwise a_n = \begin{cases} n+1, & n \text{ is odd} \\ 1, & \text{otherwise} \end{cases}

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) (x(1+x2))/((1-x2)2) + (1)/(1-x)

Combinatorics

The sequence terms are:

  • For even nn: an=1a_n = 1

  • For odd nn: an=n+1=1+na_n = n + 1 = 1 + n

We can split ana_n as an=1+bna_n = 1 + b_n, where: bn={n,n is odd0,n is evenb_n = \begin{cases} n, & n \text{ is odd} \\ 0, & n \text{ is even} \end{cases}

The generating function G(x)=∑n=0∞anxnG(x) = \sum_{n=0}^{\infty} a_n x^n can be expressed as:

G(x)=∑n=0∞xn+∑k=0∞(2k+1)x2k+1G(x) = \sum_{n=0}^{\infty} x^n + \sum_{k=0}^{\infty} (2k+1) x^{2k+1}
  1. The first sum is the standard geometric series:

∑n=0∞xn=11−x\sum_{n=0}^{\infty} x^n = \frac{1}{1-x}
  1. For the second sum, consider:

∑k=0∞x2k+1=x1−x2\sum_{k=0}^{\infty} x^{2k+1} = \frac{x}{1-x^2}

Differentiating with respect to xx:

ddx(∑k=0∞x2k+1)=∑k=0∞(2k+1)x2k=ddx(x1−x2)=1⋅(1−x2)−x(−2x)(1−x2)2=1+x2(1−x2)2\frac{d}{dx}\left(\sum_{k=0}^{\infty} x^{2k+1}\right) = \sum_{k=0}^{\infty} (2k+1) x^{2k} = \frac{d}{dx}\left(\frac{x}{1-x^2}\right) = \frac{1 \cdot (1-x^2) - x(-2x)}{(1-x^2)^2} = \frac{1+x^2}{(1-x^2)^2}

Multiplying by xx gives the desired odd-power series:

∑k=0∞(2k+1)x2k+1=x(1+x2)(1−x2)2\sum_{k=0}^{\infty} (2k+1) x^{2k+1} = \frac{x(1+x^2)}{(1-x^2)^2}

Combining both terms:

G(x)=x(1+x2)(1−x2)2+11−xG(x) = \frac{x(1+x^2)}{(1-x^2)^2} + \frac{1}{1-x}

Thus, option (A) is correct.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Combinatorics previous year question is Q36 of the GATE CSE 2022 paper. Find more GATE CSE PYQs on Combinatorics in Engineering Mathematics, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Combinatorics PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Combinatorics in GATE CSE

Combinatorics has 19 GATE CSE PYQs across 15 papers from 2012 to 2025. 5 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2022.

How GATE tests Combinatorics

More from GATE CSE 2022

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2022 · Q36 · MCQ

Which one of the following is the closed form for the generating function of the sequence { an }n ≥ 0 defined below? an = n+1, & n is odd 1, & otherwise

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.