Practice (Intermediate)

back to index  |  new

(right shifting) Find the generating function for the sequence: $$\underbrace{0, 0, \cdots, 0}_{k}, 1, 1, 1, 1, \cdots$$


Find the generating function for the sequence $1$, $2$, $3$, $4$, $\cdots$.


Find the generating function for the sequence $0$, $1$, $2$, $3$, $\cdots$.


Show that $$\frac{1}{(1-x)^2} = 1 + 2x + 3x^2 + 4x^3 + \cdots$$


Find the generating function for the sequence $2,\ 3,\ 4,\ 5,\ \cdots$.


A partition of a positive integer $n$ is to write $n$ as a sum of some positive integers. Let $k$ be a positive integer. Show that the number of partitions of $n$ with exactly $k$ parts equals the number of partitions of $n$ whose largest part is exactly $k$.


A partition of a positive integer $n$ is to write $n$ as a sum of some positive integers.. Show that the number of partitions of a positive integer $n$ into distinct parts is equal to the number of partitions of $n$ where all parts are odd integers.


Find the number of parallelograms in the following equilateral triangle of side length $n$ which is made of some smaller unit equilateral triangles.


Let $\mathbb{A}=\{a_1,\ a_2,\ \cdots,\ a_{100}\}$ be a set containing $100$ real numbers, $\mathbb{B}=\{b_1,\ b_2,\ \cdots,\ b_{50}\}$ be a set containing $50$ real numbers, and $\mathcal{F}$ be a mapping from $\mathbb{A}$ to $\mathbb{B}$. Find the number of possible $\mathcal{F}$ if  $\mathcal{F}(a_1) \le \mathcal{F}(a_2)\le\cdots\mathcal{F}(a_1)$, and for every $b_i\in\mathbb{B}$, there exists an element $a_i\in\mathbb{A}$ such that the $\mathcal{F}(a_i)=b_i$.


Given a convex $n$-polygon, what is the max number of intersection points can its diagonals form? (Vertices do not count.)

Equally divide each side of a triangle into $n$ parts and then connect these points to draw lines which are parallel to one of the triangle's sides. Find the number of parallelograms created by these lines.


In a sports contest, there were $m$ medals awarded on $n$ successive days ($n > 1$). On the first day, one medal and $1/7$ of the remaining $(m − 1)$ medals were awarded. On the second day, two medals and $1/7$ of the now remaining medals were awarded; and so on. On the $n^{th}$ and last day, the remaining $n$ medals were awarded. How many days did the contest last, and how many medals were awarded altogether?


Find the number of non-negative integer solutions to the equation $$2x_1+x_2+x_3+\cdots+x_9+x_{10}=3$$


Let $\mathbb{S}=\{1,\ 2,\ 3,\ \cdots,\ n\}$ and positive integer $m$ satisfying $n + 1\ge 2m$. Find the number of subsets of $\mathbb{S}$ which has $m$ elements and no two elements are consecutive.


How many ordered integers $(x_1,\ x_2,\ x_3,\ x_4)$ are there such that $0 < x_1 \le x_2\le x_3\le x_4 < 7$?


How many different ways to write a positive integer $n$ as a sum of $m$ different positive integers? Different sequences are treated as distinct.


Let $\mathbb{S} =\{a_1,\ a_2,\ \cdots,\ a_n\}$ be a permutation of $\{1,\ 2,\ \cdots,\ n\}$ which satisfies the condition that for every $a_i$, $(i=1$, $2$, $\cdots$, $n)$, there exists an $a_j$ where $i< j \le n$ such that $a_j=a_i+1$ or $a_j=a_i-1$. Find the number of such $\mathbb{S}$.


Let $n$ be an even integer. Find the number of ways to select four distinct integers $a$, $b$, $c$, $d$ between $1$ and $n$, inclusive, satisfying $a+c=b+d$. Order of these four numbers does not matter.


In the Banana Country, only Mr Decent always tells the truth and only Mr Joke always tells lies. Everyone else has a probability of $p$ to tell a lie. One day, Mr Decent has decided to run for the President and told his decision to the first person who in turn told this to the second person. The second person then told this to the third person, and so on, till the $n^{th}$ person who told this news to Mr Joke. No one has been told this news twice in this process. Finally, Mr Joke announced Mr Decent's decision to everyone. What is the probability that Mr Joke's statement agrees with Mr Decent's intention?


How many quadratic equations are there whose coefficients are distinct and are selected from $\{0,\ 1,\ 3,\ 5,\ 7\}$? Among these equations, how many have real roots?

Let $a$ and $b$ be two positive real numbers satisfying $(a-b)^2=4(ab)^3$. Find the minimal value of $\frac{1}{a}+\frac{a}{b}$.


How many $3\times 3$ matrices of non-negative integers are there such that the sum of every row and every column equals $n$?


(Hanoi Tower) There are $3$ identical rods labeled as $A$, $B$, $C$; and $n$ disks of different sizes which can be slide onto any of these three rods. Initially, the $n$ disks are stacked in ascending order of their sizes on $A$. What is the minimal number of moves in order to transfer all the disks to $B$ providing that each move can only transfer one disk to another rod's topmost position and at no time, a bigger disk can be placed on top of a smaller one.


Find the total number of sequences of length $n$ containing only letters $A$ and $B$ such that no two $A$s are next to each other. For example, for $n = 2$, there are $3$ possible sequences: $AB$, $BA$, and $BB$.


Let $n$ be a positive integer. Find the number of ordered collection of integers $(a,\ b,\ c,\ d)$ such that $1\le a < b \le c < d\le n+1$