company logo
    • Home
    • Register For A Free Daily Problem
    • Register As A Student
    • Sign In
    • Help
    $\newcommand{\xacomb}[2]{\raise{0.5em}{\small{#1}} C_{#2}}$ $\newcommand{\xaperm}[2]{\raise{0.5em}{\small{#1}} P_{#2}}$ $\newcommand{\xasuper}[1]{\raise{0.4em}{\underline{#1}}}$ $\newcommand{\xatooltipc}[2]{\xatooltip{\color{green}{#1}}{#2}}$ $\newcommand{\xatooltipcc}[3]{\xatooltip{\color{#1}{#2}}{#3}}$ $\newcommand{\xafactorial}[1]{\bbox[border-left: 1px solid black; border-bottom: 2px solid black; padding-left: 2px; padding-bottom: 2px; padding-right: 3px; padding-top: 2px;]{#1}}$ $\DeclareMathOperator{\sech}{sech}$ $\DeclareMathOperator{\csch}{csch}$
    Problem 1 of 30
    From a square with sides of length $5$, triangular pieces from the four corners are removed to form a regular octagon. Find the area $removed$ to the nearest integer.
    Solution:
    -----------book page break-----------
    If we cut the corners as mentioned, each of the removed pieces will be an isosceles right angled triangle as shown below:


    Let the side of this triangle be $x$. The hypotenuse will be $x\sqrt{2}$. Since this side is part of the regular octagon, we get the relation:

    $x + x\sqrt{2} + x = 5$

    $\Rightarrow x(2 + \sqrt{2}) = 5$

    $\Rightarrow x = \dfrac{5}{2 + \sqrt{2}}$

    -----------book page break-----------
    $\Rightarrow x = \dfrac{5(2 - \sqrt{2})}{4 - 2} = \dfrac{5(2 - \sqrt{2})}{2}$

    Area of four triangles $= 4\times \dfrac{1}{2} x^2 = 2x^2$

    $= 2 \left\{\dfrac{5(2 - \sqrt{2})}{2}\right\}^2$

    $= 2 \left\{\dfrac{25(6 - 4\sqrt{2})}{4}\right\}$

    $= 2 \left\{\dfrac{150 - 100\sqrt{2}}{4}\right\}$

    $= \dfrac{150 - 141.4}{2} = \dfrac{8.6}{2} = 4.3$ 

    The nearest integer to $4.3$ is $4$.


    Problem 2 of 30
    Let $f(x)= x^2 + ax + b.$ If for all nonzero real $x$
    $ f\left(x+\dfrac{1}{x}\right)=f(x)+f\left(\dfrac{1}{x}\right)$
    and the roots of $f(x)=0$ are integers, what is the value of $a^2 +b^2\ ?$ 
    Solution:
    As $f(x)=x^2 +ax+b$, for $x=x+\dfrac{1}{x}$,

    $ f\left(x+\dfrac{1}{x}\right)=\left(x+\dfrac{1}{x}\right)^2 + a\left(x+\dfrac{1}{x}\right)+b$

    $f(x)=x^2 +ax+b$

    Similarly, for $x=\dfrac{1}{x}$',

    $f\left(\dfrac{1}{x}\right)=\left(\dfrac{1}{x}\right)^2 +a\left(\dfrac{1}{x}\right)+b$

    -----------book page break-----------
    We know from the problem statement that,
    $ f\left(x+\dfrac{1}{x}\right)=f(x)+f\left(\dfrac{1}{x}\right)$
    $\Rightarrow \left(x+\dfrac{1}{x}\right)^2 + a\left(x+\dfrac{1}{x}\right)+b=x^2 +ax+b+\left(\dfrac{1}{x}\right)^2 +a\left(\dfrac{1}{x}\right)+b$
    $\Rightarrow \cancel{x^2}+2+\cancel{\dfrac{1}{x^2}} + \cancel{ax} +\cancel{\dfrac{a}{x}} + \cancel{b} = \cancel{x^2} +\cancel{ax}+\cancel{b} + \cancel{\dfrac{1}{x^2}} + \cancel{\dfrac{a}{x}} + b$
    $\Rightarrow b=2$

    The roots of the equation $f(x)=0$ are $\dfrac{-a+\sqrt{a^2-4b}}{2}$ and $\dfrac{-a-\sqrt{a^2-4b}}{2}$, both of which are integers.
    This means that $(a^2-4b) = (a^2 - 8)$ has to be a perfect square and $a$ has to be a rational number.
    If,
    $a^2 - 8 = 0$
    $\Rightarrow a = 2\sqrt{2}$ which is not a rational number.
    Therefore, we cannot consider this value for $a$.

    If $a^2 - 8 = 1$
    $\Rightarrow a = 3$. This is a valid value since $a$ is an integer and $a^2 - 8$ is a perfect square.

    $\therefore a = 3$, $b = 2$
    $\Rightarrow a^2 + b^2 = 9 + 4 = 13$


    Problem 3 of 30
    Let $x_1$ be a positive real number and for every integer $N \ge 1$ let $x_{n+1} = 1 + x_1x_2...x_{n-1}x_n$. If $x_5 = 43$, what is the sum of digits of the largest prime factor of $x_6$?
    Solution:
    From the given definition of $x_n$, we know that:
    $x_5 = 1 + x_1x_2...x_4 = 43$
    $\therefore x_1x_2...x_4 = 42$

    $\therefore x_6 = 1 + x_1x_2...x_4x_5$
    $\Rightarrow x_6 = 1 + 42\times 43 = 1807$

    Factorising $1807$ into its prime factors we get
    $1807 = 13 \times 139$ 

    The largest prime number is $139$ and the sum of its digits is $13$

    Problem 4 of 30
    An ant leaves the anthill for its morning exercise. It walks $4$ feet east and then makes a $160^\circ$ turn to the right and walks $4$ more feet. It then makes another $160^\circ$ turn to the right and walks $4$ more feet. If the ant continues this pattern until it reaches the anthill again, what is the distance in feet it would have walked?
    Solution:
    Let $P_0$ be the starting point of the ant, and after it moves $4$ feet to the east, it reaches $P_1$, then it takes $160^\circ$ turn towards its right, and walks another $4$ feet to reach $P_2$.
    Let's say the ant travels a total of $n$ path segments, reaching point $P_i$ after completing the $i\xasuper{th}$ segment. After $n$ segments the ant reaches point $P_n$ with is same as the starting point $P_0$.

    Let $M_1$ and $M_2$ be the midpoints $P_0P_1$ and $P_1P_2$, let us draw the perpendicular bisectors of lines $P_0P_1$ and $P_1P_2$, intersecting at $O$.


    -----------book page break-----------
    We get a diagram as shown below:


    As given in the problem, $\angle P_0P_1P_2 = 180 - 160 = 20^\circ$

    Considering $\triangle OM_1P_1$ and $\triangle OM_2P_1$,
    $OP_1$ is common
    $M_1P_1 = M_2P_1$
    $\angle OM_1P_1 = \angle OM_2P_1$
    Therefore, $\triangle OM_1P_1 \cong \triangle OM_2P_1$  (using $RHS$ rule)
    Therefore, $\angle OP_1M_1 = \angle OP_1M_2 = 10^\circ$
    And $OM_1 = OM_2$.
    Let us draw a circle with $O$ as the centre and $OM_1$ as the radius. From point $P_2$ we draw a tangent to this circle at $M_3$ and extend the tangent to $P_3$ to make it equal to $4$ feet

    Similarly $\triangle OM_2P_2 \cong OM_2P_1$ (using $SAS$ rule)
    $\therefore \angle OP_2M_2 = OP_1M_2 = 10^\circ$

    Since $P_2M_2$ and $P_2M_3$ are tangents to the same circle, we can prove that:
    $\triangle OM_3P_2 \cong \triangle OM_2P_2$   (using $SSS$ rule)

    -----------book page break-----------
    $\therefore OP_2M_3 = OP_2M_2 = 10^\circ$
    $\therefore \angle M_2P_2M_3 = 10 + 10 = 20^\circ$
    Therefore $P_2M_3$ is the ants path from point $P_2$ and $P_2P_3$ represents the complete path segment in that direction.

    We can show that the tangent to $\Omega$ from $P_3$ will make an angle of $20^\circ$ with $P_2P_3$ and therefore will be the next path of the ant.
    Now we can see that every path the ant takes will be a tangent to the circle $\Omega$.
    The last path segment from point $P_{n-1}$ will also be a tangent to $\Omega$ as shown in the figure.
    Thus $P_0$ and $P_n$ will coincide and be the endpoint of the last path segment of the ant.
    Now, we can show that $\triangle OP_0M_1 \cong OP_1M_1$
    Therefore, $\angle OP_0M_1 = \angle OP_1M_1 = 10^\circ$
    Therefore, considering $\triangle OP_0P_1$,
    $\angle P_0OP_1 = 180 - 2 \times 10 = 160$.
    We can see that the line $OP_i$ rotates by $160^\circ$ every time the ant completes a path segment.

    Since $OP_n$ coincides with $OP_0$, we can say that:
    $n \times 160$ is some integer multiple of $360$
    Therfore,
    $n \times 160 = m \times 360$
    $n = \dfrac{m \times 360}{160} = \dfrac{m \times 9}{4}$

    The minimum integer value of $n$ in the above equation will give us the number of path segments the ant covered before reaching $P_0$ for the first time.
    For $n$ to be the minimum positive integer, the value of $m$ is $4$.
    Therefore, $n = 9$ 
    Therefore, the total distance covered by the ant is $9 \times 4 = 36$ feet.


    Problem 5 of 30
    Five persons wearing badges with numbers $1,\ 2,\ 3,\ 4,\ 5$ are seated on $5$ chairs around a circular table. In how many ways can they be seated so that no two persons whose badges have consecutive numbers are seated next to each other? (Two arrangements obtained by rotation around the table are considered different.)
    Solution:
    It will be easier to solve this problem by counting the arrangements considering a fixed position for any one of the persons, and later count the possible number of rotations.
    Let us name the chairs as $A$, $B$, $C$, $D$ and $E$ as shown in the following figure:

    -----------book page break-----------


    We can fix chair $A$ the for person $1$. Once we have fixed chair $A$ for $1$, the two adjacent chair $B$ and $E$ cannot be occupied by $2$. hence $2$ can be seated either on $C$ or $D$.
    If $2$ is seated on $C$, then $3$ can only be seated on $E$, $4$ can be seated only on $B$ and $5$ can be seated only on $D$. Else if $2$ is seated on $D$ then $3$ can only be seated on $B$, $4$ can be seated only on $E$, and $5$ can be seated only on $C$.

    Therefore, once the position of $1$ is fixed, there can be $2 \times 1 \times 1 \times 1 = 2$ possible arrangements.
    Now, each of these two arrangements can be rotated to $5$ different positions, including the initial one, giving us a total of:
    $5 \times 2 = 10$ possible seating arrangements.


    Problem 6 of 30
    Let $\overline{abc}$ be a three digit number with nonzero digits such that $a^2 + b^2 = c^2$. What is the largest possible prime factor of $\overline{abc}$?
    Solution:
    The smallest Pythagorean triplet is $3,\ 4,\ 5$
    The next larger Pythagorean triplet will be $6,\ 8,\ 10$ or $5,\ 12,\ 13$. Since $a,\ b,\ c$ are digits we these are not possible values of $abc$.

    Therefore, the possible values of $\overline{abc}$ are $345$ or $435$.
    We can factorise each of them as:
    $345 = 5 \times 3 \times 23$ and
    $435 = 5 \times 3 \times 29$

    Therefore, the highest possible prime factor is $29$


    Problem 7 of 30
    On a clock, there are two instants between $12$ noon and $1$ PM, when the hour hand and the minute hand are at right angles.
    The difference $in\ minutes$ between these two instants is written as $a + \dfrac{b}{c}$, where $a,\ b,\ c$ are positive integers, with $b < c$ and $b/c$ in the reduced form. What is the value of $a + b + c$?
    Solution:
    The clock hands will be at right angles, when the angle formed by rotating the minute hand will be $90^\circ$ and $270^\circ$ in the clockwise direction with respect to the hour hand.

    We will solve this problem using the method described  .
    Let the minute hand be at $90^\circ$ and $270^\circ$ with the hour hand at $t_1$ and $t_2$ mins after $12$ noon.
    In $t_1$ mins the hour hand will rotate by $\left(\dfrac{t_1}{2}\right)^\circ$
    In $t_1$ mins the minute hand rotate by $(6t_1)^\circ$

    -----------book page break-----------
    At $12$ noon the angle between the two hands is $0^\circ$.
    Therefore,
    we can say that $6t_1 - \dfrac{t_1}{2} = 90$

    Also, for $t_2$, we can say:
    $6t_2 - \dfrac{t_2}{2} = 270$
    Subtracting:
    $6t_2 - 6t_1 - \dfrac{t_2}{2} + \dfrac{t_1}{2} = 270 - 90$

    $6(t_2 - t_1) - \dfrac{t_2 - t_1}{2} = 180$

    Since we need to find the difference in $t_2$ and $t_1$, let $t_2 - t_1 = x$

    $6x - \dfrac{x}{2} = 180$
    $x \times \dfrac{11}{2} = 180$
    $x = \dfrac{360}{11} = 32\dfrac{8}{11} = 32 + \dfrac{8}{11}$

    The answer in the form of $a + b + c$ is $32 + 8 + 11 = 51$


    Problem 8 of 30
    How many positive integers $n$ are there such that $3 \le n \le 100$ and $x^{2^n} + x + 1$ is divisible by $x^2 + x + 1$?
    Solution:
    We know that if $p(x)$ is divisible by $q(x)$ then $p(x)$ is divisible by all factors of $q(x)$ as well.
    $x^2 + x + 1$ is a quadratic expression, therefore solving
    $x^2 + x + 1 = 0$ we will get both roots of the equation.

    The roots of the above equation are:
    $x = \dfrac{-1 \pm \sqrt{1 - 4}}{2} = \dfrac{-1 \pm \sqrt{-3}}{2}$

    Since the number under the square root above is negative, this means there is no real solution for this equation, and both roots are complex numbers.
    Let
    $\alpha = \dfrac{-1 - \sqrt{-3}}{2}$ and $\beta = \dfrac{-1 + \sqrt{-3}}{2}$

    -----------book page break-----------
    Squaring $\alpha$ we get:
    $\alpha^2 = \left\{-\left(\dfrac{1 + \sqrt{-3}}{2}\right)\right\}^2$

    $= \dfrac{1 - 3 + 2\sqrt{-3}}{4}$

    $= \dfrac{-2 + 2\sqrt{-3}}{4}$

    $= \dfrac{-1 + \sqrt{-3}}{2}$

    $= \beta$

    Similarly $\alpha^3 = \alpha^2 \times \alpha$
    $= \dfrac{-1 - \sqrt{-3}}{2} \times \dfrac{-1 + \sqrt{-3}}{2}$

    $= \dfrac{(-1) - \sqrt{-3}}{2} \times \dfrac{(-1) + \sqrt{-3}}{2}$

    $= \dfrac{(-1)^2 - (\sqrt{-3})^2}{4}$

    $= \dfrac{1 - (-3)}{4} = 1$

    -----------book page break-----------
    Since $\alpha$ is a root of the equation $x^2 + x+ 1 = 0$
    $\alpha^2 + \alpha + 1 = 0$

    $\Rightarrow \alpha + 1 = -\alpha^2$

    Since $(x - \alpha)$ divides $x^{2^n} + x + 1$, $\alpha$ is a root of the equation $x^{2^n} + x + 1 = 0$, we can write
    $\alpha^{2^n} + \alpha + 1 = 0$

    $\therefore \alpha^{2^n} - \alpha^2 = 0$

    $\Rightarrow \alpha^{2^n} = \alpha^2$

    $\because \alpha^3 = 1$ we can also write:
    $\alpha^{2^n} = \alpha^2 = \alpha^2.1 = \alpha^2 \alpha^3 = \alpha^5$

    If we repeatedly multiply by $\alpha^3$, which is $1$, we get:
    $\alpha^{2^n} = \alpha^2 = \alpha^5 = \alpha^8 ...$

    Therfore, all values of $n$, such that $2^n \in \{2,\ 5,\ 8,\ ...\}$ will satisfy the given divisibility condition.

    Expressing as an $A.P$ series,
    $2^n$ has to be a term of the series $T_k = 2 + (k - 1)3 = 3k - 1$, where $T_k$ is the $k\xasuper{th}$ term of the $A.P$ series.

    Therefore, we can write:
    $2^n = 3k - 1$
    $\Rightarrow 3k = 2^n + 1$

    -----------book page break-----------
    This means that $n$ should be such that $2^n + 1$ is divisible by $3$.

    Using   notations, $2^n + 1\equiv\ 0\ (mod\ 3)$

    $\Rightarrow 2^n \equiv -1\ (mod\ 3) \equiv 2\ (mod 3)$

    We know that:
    $2 \equiv 2\ (mod\ 3)$
    and $2 \times 2 = 2^2 \equiv 1\ (mod\ 3)$

    $2^3 \equiv 2 \times 1\ (mod\ 3) \equiv 2\ (mod\ 3)$

    $2^4 \equiv 2 \times 2\ (mod\ 3) \equiv 1\ (mod\ 3)$

    So we can see that:
    $2^n \equiv 2\ (mod\ 3)$ when $n$ is odd, and

    $2^n \equiv 1\ (mod\ 3)$ when $n$ is even.

    Therefore, the cases that will satisfy our equation are all odd values of $n$.
    There are
    $\dfrac{99 - 3}{2} + 1 = 49$ odd number between $3$ and $100$, both inclusive.

    Therefore, $n$ can have $49$ values.

    For those who are familiar with complex numbers, this can be solved easily using the concept of Cube Root Of Unity.

    Problem 9 of 30
    Let the rational number $p/q$ be closest to but not equal to $22/7$ among all rational numbers with denominator $\lt 100$. What is the value of $p - 3q$?
    Solution:
    Our objective is to minimise $\left| \dfrac{22}{7} - \dfrac{p}{q} \right|$ without making it $0$.

    $\left| \dfrac{22}{7} - \dfrac{p}{q} \right|$

    $= \left| \dfrac{22q - 7p}{7q}\right|$

    Since $\left| {22q - 7p} \right|$ is positive not equal to $0$, and $p,\ q$ are integers, its minimum value is $1$.
    Since $7q$ should be maximised using $q \le 99$, we can put $q = 99$
    $22 \times 99 - 7p = \pm 1$
    Taking $22 \times 99 - 7p= 1$ we get:
    $p = \dfrac{22\times 99 - 1}{7} = \dfrac{2178 - 1}{7} = 311$

    Taking $22 \times 99 - 7p = -1$ we get:
    $p = \dfrac{22\times 99 + 1}{7} = \dfrac{2178 - 1}{7} = 311\dfrac{2}{7}$
    Since $p$ is an integer, we will only consider $p = 311$

    Therefore, $p - 3q = 311 - 99 \times 3 = 14$


    Problem 10 of 30
    Let $ABC$ be a triangle and let $\Omega$ be its circumcircle. The internal bisectors of angles $A$, $B$ and $C$ intersect $\Omega$ at $A_1$, $B_1$ and $C_1$ respectively, and the internal bisectors of angles $A_1$, $B_1$ and $C_1$ of the triangle $A_1B_1C_1$ intersect $\Omega$ at $A_2B_2C_2$, respectively. If the smallest angle of triangle $ABC$ is $40^\circ$, what is the magnitude of the smallest angle of $A_2B_2C_2$ in degrees?
    Solution:
    -----------book page break-----------
    To maintain clarity of our diagram, we will split the diagram in two parts.
    Figure-1, showing only $\triangle ABC$ and $\triangle A_1B_1C_1$, while Figure-2 showing $\triangle A_1B_1C_1$ and $\triangle A_2B_2C_2$

    Without loss of generality, let us assume that $\angle C = 40^\circ$
    Also, let us take $\angle A = 2x$ and $\angle B = 2y$
    Therefore, $2x + 2y + 40 = 180 \Rightarrow x + y + 20 = 90$, and
    $x,\ y \gt 20$


    -----------book page break-----------
    Taking angles subtended by the same arcs, we get:
    $\angle A_1 = (y + 20)^\circ$
    $\angle B_1 = (x + 20)^\circ$
    $\angle C_1 = (x + y)^\circ$


    Using the diagram above the same logic as before, we get:
    $\angle A_2 = \dfrac{\angle B_1}{2} + \dfrac{\angle C_1}{2}$
    $\Rightarrow \angle A_2 = \dfrac{x + 20}{2} + \dfrac{x + y}{2} = \dfrac{2x + y + 20}{2}$
    $= \dfrac{2x + y + 20}{2} = \dfrac{x + 90}{2}$

    -----------book page break-----------
    $\angle B_2 = \dfrac{\angle A_1}{2} + \dfrac{\angle C_1}{2}$
    $\Rightarrow \angle B_2 = \dfrac{y + 20}{2} + \dfrac{x + y}{2} = \dfrac{x + 2y + 20}{2}$
    $= \dfrac{y + 90}{2}$

    $\angle C_2 = \dfrac{\angle A_1}{2} + \dfrac{\angle B_1}{2}$
    $\Rightarrow \angle C_2 = \dfrac{x + 20}{2} + \dfrac{y + 20}{2} = \dfrac{x + y + 40}{2}$
    $= \dfrac{90 + 20}{2} = 55$

    Since $x \gt 20$
    $x + 90 \gt 90 + 20$
    Since $y \gt 20$
    $y + 90\gt 90 + 20$
    Therefore the smallest angle in $\triangle A_2B_2C_2$ is $\angle C_2$, which is $55^\circ$.


    Problem 11 of 30
    How many distinct triangles $ABC$ are there, up to similarity, such that the magnitudes of angle $A,\ B$ and $C$ in degrees are positive integers and satisfy

    $cos\ A\ cos\ B + sin\ A\ sin\ B\ sin\ kC = 1$

    for some positive integer $k$, where $kC$ does not exceed $360^\circ$
    Solution:
    We know that
    $cos(A - B) = cos\ A\ cos\ B + sin\ A\ sin\ B$

    Replacing $cos\ A\ cos\ B$ with $cos(A-B) - sin\ A\ sin\ B$, we get:

    $cos(A-B) - sin\ A\ sin\ B + sin\ A\ sin\ B\ sin\ kC = 1$

    $\Rightarrow sin\ A\ sin\ B(sin\ kC - 1) = 1 - cos(A-B)$

    -----------book page break-----------
    $sin\ kC \le 1$
    $\Rightarrow sin\ kC - 1 \le 0$
    whereas
    $cos(A-B) \le 1$
    $\Rightarrow 1 - cos(A-B) \ge 0$

    Since $A,\ B \lt 180$, $sin\ A$ and $sin\ B$ are positive, 
    $\therefore sin\ A\ sin\ B(sin\ kC - 1) \le 0$ and
    $1 - cos(A-B) \ge 0$
    Therefore, the only condition where both of them can be equal is when both are equal to $0$.
    Therefore, $1 - cos(A-B) = 0$
    $\Rightarrow cos(A - B) = 1$
    $\therefore A - B = 0$
    $\Rightarrow A = B = \dfrac{180 - C}{2} = 90 - \dfrac{C}{2}$
    Therefore, for $A,\ B$ to be integers $C$ has to be an even number.

    Since $sin\ kC - 1 = 0$
    $\Rightarrow sin\ kC = 1$
    Since $kC \le 360^\circ$, $kC$ can only be $90^\circ$
    $\therefore C = \dfrac{90}{k}$
    Notice that $90$ has only one $2$ as a factor, therefore, for $C$ to be an even number, $k$ has to be an odd divisor of $90$.
    There are $(2 + 1)(1 + 1)(1 + 1) = 12$ divisors of $90$, which are as follows:
    $1, 2, 3, 5, 6, 9, 10, 15, 18, 30, 45, 90$
    and the odd divisors of $90$ are:
    $1,\ 3,\ 5,\ 9,\ 15,\ 45$

    Hence there are $6$ possible values of $k$.


    Problem 12 of 30
    A natural number $k \gt 1$ is called $good$ if there exist natural numbers
    $a_1 \lt a_2 \lt \ ...\ \lt a_k$
    such that
    $\dfrac{1}{\sqrt{a_1}} + \dfrac{1}{\sqrt{a_2}} + ... + \dfrac{1}{\sqrt{a_k}} = 1$ 

    Let $f(n)$ be the sum of the first $n$ $good\ numbers$, $n \ge 1$. Find the sum of all values of $n$ for which $f(n+5)/f(n)$ is an integer.
    Solution:

    It can be easily proven that for integers $n_1,\ n_2$ where $1 \lt n_1 \lt n_2$
    $\dfrac{1}{n_1} + \dfrac{1}{n_2}$ cannot be equal to $1$
    We will do a quick proof using contradiction.
    Let us say there exists integer $n_1,\ n_2$, where $1 \lt n_1 \lt n_2$, and
    $\dfrac{1}{n_1} + \dfrac{1}{n_2} = 1$

    $\Rightarrow \dfrac{1}{n_1} = 1 - \dfrac{1}{n_2}$

    -----------book page break-----------
    $\Rightarrow \dfrac{1}{n_1} = \dfrac{n_2 - 1}{n_2}$

    Since $n_1 \ge 2$, $n_2 \ge 3$
    We know that for any integer $n_2 \ge 2$, $n_2-1$ and $n_2$ are coprime.
    Since $n_2 \ge 3$, $n_2 - 1 \ge 2$ and the fraction $\dfrac{n_2 - 1}{n_2}$ can never be reduced to obtain $\dfrac{1}{n_1}$.
    Therefore, $2$ cannot be a good number.

    If we have any two consecutive integers $a$, $a + 1$, then
    $\dfrac{1}{a} + \dfrac{1}{a + 1} + \dfrac{1}{a(a + 1)}$ becomes:
    $\dfrac{(a + 1) + a + 1}{a(a+1)}$
    $= \dfrac{2a + 2}{a(a+1)} = \dfrac{2}{a}$

    If we choose $a = 2$, then we get:
    $\dfrac{1}{2} + \dfrac{1}{3} + \dfrac{1}{2.3} = \dfrac{2}{2} = 1$
    So we can have $3$ as a good number with $a_1 = 4$, $a_2 = 9$ and $a_3 = 36$

    Starting with $3$ it is easy to form good numbers with any count of integers.
    We already have $\dfrac{1}{2} + \dfrac{1}{3} + \dfrac{1}{6} = 1$

    -----------book page break-----------
    If we multiply both sides by $\dfrac{1}{2}$, and add $\dfrac{1}{2}$, we will again get $1$ for example:

    $\dfrac{1}{2} + \dfrac{1}{2} \left(\dfrac{1}{2} + \dfrac{1}{3} + \dfrac{1}{6}\right) = 1$

    $\dfrac{1}{2} + \dfrac{1}{4} + \dfrac{1}{6} + \dfrac{1}{12} = 1$

    As before, we can again multiply both sides by $\dfrac{1}{2}$ and add $\dfrac{1}{2}$ to get a sequence of five reciprocals that add up to $1$.

    Therefore, the sum of the first $n$ good numbers $f(n)$ is:
    $3 + 4 + ... + n + (n+1) + (n+2)$
    $= \dfrac{(n+2)(n+3)}{2} - 3 = \dfrac{n(n+1) - 6}{2}$
    $= \dfrac{n^2 + 5n + 6 - 6}{2}$
    $= \dfrac{n(n+5)}{2}$

    Therefore,
    $f(n + 5) = \dfrac{(n+5)\{(n+5) + 5\}}{2} = \dfrac{(n + 5)(n+10)}{2}$

    Therefore,
    $\dfrac{f(n+5)}{f(n)} = \dfrac{n + 10}{n}$
    $= 1 + \dfrac{10}{n}$

    -----------book page break-----------
    For this number to be an integer, $n$ must be a divisor of $10$.

    Therefore,
    $n\ \epsilon\ \{1, 2, 5, 10\}$

    Sum of all $n = 1 + 2 + 5 + 10 = 18$


    Problem 13 of 30
    Each of the numbers $x_1,\ x_2,\ ...,\ x_{101}$ is $\pm 1$. What is the smallest positive value of 
    $\sum\limits_{1 \le i \lt j \le 101} x_ix_j$?
    Solution:
    The expanded series would look like:
    $\sum\limits_{1 \le i \lt j \le 101} x_ix_j = x_1x_2 + x_1x_3 + ... + x_2x_3 + x_2x_4 + ... + x_{100}x_{101}$

    We know the generic relationship:
    $(a_1 + a_2 + ..  a_n)^2 = a_1^2 + a_2^2 + ... + a_n^2 + 2a_1a_2 + 2a_1a_3 +  ... + 2a_{n-1}a_{n}$

    Therefore:
    $x_1x_2 + x_1x_3 + ... + x_2x_3 + x_2x_4 + ... + x_{100}x_{101}$

    $= \dfrac{(x_1 + x_2 + ... x_n)^2 - (x_1^2 + x_2^2 + ... + x_n^2)}{2}$

    The term $(x_1^2 + .x_2^2 + ... + x_n^2)$ will always be $101$ for any combination of $x_i = \pm 1$

    For the whole expression to be a positive integer, we need to find the minimum odd perfect square greater than $101$, which is $121$
    Therefore is minimum value of,
    $x_1x_2 + x_1x_3 + ... + x_2x_3 + x_2x_4 + ... + x_{100}x_{101}$ is

    $\dfrac{121 - 101}{2}$

    $= 10$


    Problem 14 of 30
    Find the smallest positive integer $n \ge 10$ such that $n + 6$ is a prime and $9n + 7$ is a perfect square.
    Solution:
    Since $n + 6$ is a prime number greater that $10$, $n + 6$ has to be odd, therefore $n$ is also odd.
    Let us substitute $n = 2m + 1$ where $m$ is any integer.

    Therefore $9(2m + 1) + 7$ is a perfect square and we can write
    $9(2m + 1) + 7 = p^2$ where $p$ is an integer.
    $\Rightarrow 18m + 16 = p^2$
    $\Rightarrow 18m = p^2 - 16$
    $\Rightarrow 18m = (p - 4)(p+4)$

    $18m$ is even, therefore $(p - 4)(p+4)$ is also even.
    Either $p - 4$ is even or $p + 4$ is even or both are even.
    If either $p - 4$ or $p + 4$ is even, then $p$ is even, therefore both $p - 4$ and $p + 4$ are even.

    -----------book page break-----------
    Let us substitute $p = 2k$ where $k$ is some integer.
    $\therefore 18m = (2k - 4)(2k + 4)$ 
    $\Rightarrow 18m = 4(k - 2)(k + 2)$
    $\Rightarrow 9m = 2(k - 2)(k + 2)$

    The right hand side is divisible by $9$, therefore the left hand side is also divisible by $9$, and therefore by $3$.
    If $k - 2$ is divisible by $3$ then
    $k - 2 \equiv 0\ (mod\ 3)$
    $\Rightarrow k \equiv 2\ (mod\ 3)$
    $\Rightarrow k + 2 \equiv 4\ (mod\ 3)\ \equiv 1\ (mod\ 3)$
    Therefore, in this case, $k + 2$ is not divisible by $3$
    Similarly we can show that if $k + 2$ is divisible by $3$, $k - 2$ is not.

    Therefore, if $k - 2$ is divisible by $3$, then it is also divisible by $9$ or if $k + 2$ is divisible by $3$, then it is also divisible by $9$.

    Let us consider the case where $k - 2$ is divisible by $9$.
    $k = 9r - 2$
    The smallest such integer is $7$
    Back substituting we get:
    $p = 2k = 14$
    $p^2 = 196$
    $9n + 7 = 196$
    $9n = 189$
    $n = 21$
    $n + 6 = 27$ is not a prime number.

    -----------book page break-----------
    Similarly, considering the case $k + 2$ is divisible by $9$
    $k = 9r + 2$
    The smallest such integer is $11$
    Back substituting we get:
    $p = 2k = 22$
    $p^2 = 484$
    $9n + 7 = 484$
    $9n = 477$
    $n = 53$
    $n + 6 = 59$ is a prime number.
    This satisfies the given condition.

    Let us observe that in both cases the value of $n$ will increase as $k$ increases.
    Therefore, the smallest positive integer satisfying the given conditions is $n = 53$


    Problem 15 of 30
    In how many ways can a pair of parallel diagonals of a regular polygon of $10$ sides be selected?
    Solution:
    Let us look at the regular decagon shown below.



    -----------book page break-----------
    If we select any two opposite sides, we can form a rectangle $ABCD$ as shown above.
    The two sides of the rectangle $AB$ and $DC$ are formed by parallel diagonals. There are two more lines parallel to these sides, forming a set of $4$ parallel lines as shown in blue. In this set of $4$ parallel lines we can choose any two in $\xacomb{4}{2}$ ways.
    Also, if we choose any of the two diagonals, we can form a set of $3$ parallel lines, as shown in red. Now, observe that each diagonal will appear in exactly two rectangles formed by choosing two of the opposite sides.
    For example $AC$ is the diagonal of $ABCD$, and it is also the diagonal of the rectangle formed by rotating $ABCD$ by one side in the clockwise direction.
    Therefore, while counting we should count only one diagonal per rectangle.
    We can form $5$ distinct rectangles by selecting opposite sides.
    We can choose the rectangle in $\xacomb{5}{1}$ ways.
    Hence the total number of ways to choose a parallel diagonal is $\xacomb{5}{1} (\xacomb{4}{2} + \xacomb{3}{2})$
    $= 5 (6 + 3) = 45$ ways.


    Problem 16 of 30
    A pen costs $Rs.\ 13$ and a notebook costs $Rs.\ 17$  A school spends exactly $Rs.\ 10000$ in the year $2017-18$ to buy $x$ pens and $y$ notebooks such that $x$ and $y$ are as close as possible (i.e. $|x-y|$ is minimum). Next year, in $2018-19$, the school spends a little more than $Rs.\ 10000$ and buys $y$ pens and $x$ notebooks. How much $more$ did the school pay?
    Solution:
    From the given data for the year $2017-18$, we can form the equation:
    $13x + 17y = 10000$, where $x$ and $y$ are non-negative integers.

    We will solve this equation using the method to solve Linear Diophantine Equation as described .

    We will use modular arithmetic to find the initial values of $x_0$, $y_0$
    Dividing $10000$ by $13$ we get:
    $10000 \equiv 3\ (mod\ 13)$

    Also,
    $17 \equiv 4\ (mod\ 13)$
    $17 \times 4 \equiv 4 \times 4\ (mod\ 13) = 16\ (mod\ 13) \equiv 3\ (mod\ 13)$

    -----------book page break-----------
    Therefore, $10000 - 17\times 4 = 9932$ should be divisible by $13$
    Dividing, we get:
    $9932 \div 13 = 764$
    Therefore, $x_0 = 764$ and $y_0 = 4$

    The parametric form of our equation becomes:
    $x = -17t + 764$
    $y = 13t + 4$

    We need to find an integer value of $t$ such that $x \approx y$

    If $x = y$, 
    $-17t + 764 = 13t + 4$
    $30t = 760$
    $3t = 76$
    $t = 25\dfrac{1}{3}$
    We can try putting $t = 25$ and $t = 26$ to find the closest values of $x$ and $y$
    For $t = 25$,
    $x = 339$
    $y = 329$
    $|x-y| = 10$

    And for $t = 26$
    $x = 322$
    $y = 342$
    $|x - y| = 20$

    $\therefore (x - y)$ is minimum for $t = 25$ and the corresponding $x$ and $y$ values are $339$ and $329$ respectively.

    -----------book page break-----------
    Next year the school bought $329$ pens and $339$ notebooks,
    Hence the difference is $10 \times 17 - 10 \times 13 = 40$

    Therefore, the answer is $40$


    Problem 17 of 30
    Find the number of ordered triples $(a,\ b,\ c)$ of positive integers such that $30a + 50b + 70c \le 343$.
    Solution:
    Given that $30a + 50b + 70c \le 343$
    $\Rightarrow 3a + 5b + 7c \le 34.3$

    Since $a,\ b,\ c$ are integers, we can conclude that:
    $3a + 5b + 7c \le 34$

    Given that $a,\ b,\ c$ are positive integers,
    $a,\ b,\ c \ge 1$
    Therefore, we can make the following substitutions,
    $a = p + 1$
    $b = q + 1$
    $c = r + 1$ where $p,\ q,\ r$ are integers $\ge 0$
    $\therefore 3(p + 1) + 5(q + 1) + 7(r + 1) \le 34$
    $\Rightarrow 3p + 5q + 7r \le 19$

    -----------book page break-----------
    Taking the valid values of the three variables independently, we can see that:
    $r\ \epsilon\ \{0, 1, 2\}$
    $q\ \epsilon\ \{0, 1, 2, 3\}$
    $p\ \epsilon\ \{0, 1, 2, 3, 4, 5, 6\}$

    Now we will need to count the possible values of $p$ by setting different values of $r$ and $q$
    For $r = 0,\ q = 0$
    $p \le \dfrac{19}{3} \Rightarrow p = 0 \longrightarrow 6$ ($7$ values)
    For $r = 0,\ q = 1$
    $p \le \dfrac{14}{3} \Rightarrow p = 0 \longrightarrow 4$ ($5$ values)
    For $r = 0,\ q = 2$
    $p \le \dfrac{9}{3} \Rightarrow p = 0 \longrightarrow 3$ ($4$ values)
    For $r = 0,\ q = 3$
    $p \le \dfrac{4}{3} \Rightarrow p = 0 \longrightarrow 1$ ($2$ values)

    For $r = 1,\ q = 0$
    $p \le \dfrac{12}{3} \Rightarrow p = 0 \longrightarrow 4$ ($5$ values)
    For $r = 1,\ q = 1$
    $p \le \dfrac{7}{3} \Rightarrow p = 0 \longrightarrow 2$ ($3$ values)
    For $r = 1,\ q = 2$
    $p \le \dfrac{2}{3} \Rightarrow p = 0$ ($1$ value)
    For $r = 1$ $q$ cannot be $3$ or more.

    -----------book page break-----------
    For $r = 2,\ q = 0$
    $p \le \dfrac{5}{3} \Rightarrow p = 0 \longrightarrow 1$ ($2$ values)
    For $r = 2,\ q = 1$ $p$ can only be $0$ ($1$ value)
    For $r = 2$ $q$ cannot be $2$ or more.

    Therefore, there are $30$ ordered triplets of $a,\ b,\ c$ satisfying the given inequality.


    Problem 18 of 30
    How many ordered pairs of $(a,\ b)$ of positive integers with $a \lt b$ and $100 \le a,\ b \le 1000$ satisfy 
    $gcd(a,b):lcm(a,b) = 1:495$?
    Solution:
    We can express $495$ in terms of its prime factors as:
    $495 = 3^2 \times 5 \times 11$
    Let two numbers $a,\ b$ be such that their $gcd = 1$ and $lcm = 495$, then $a$ and $b$ are coprimes,
    and $a \times b = lcm = 495$
    If we distribute the factors of $495$ by keeping the same prime numbers in the same group, then the partitioned numbers will satisfy this condition.
    For example $a = 5$ and $b =  3^2 \times 11$, will be one such partition.
    The number of ways we can choose the first group, is $2^3 = 8$ ways.
    However, this will lead to each partition occurring twice,
    for example if we have $a = 5$ and $b = 3^2 \times 11$ as one partition, we will have $a = 3^2 \times 11$ and $b = 5$, as another group.

    -----------book page break-----------
    If we take $a < b$ we will have $8 \div 2 = 4$ partitions, which are as follows:
    $a = 1,\ b = 495$
    $a = 3^2,\ b = 55$
    $a = 5,\ b = 99$
    $a = 11,\ b = 45$

    Any integer multiple of the above numbers, $ap,\ bp$ where $p$ is an integer, will satisfy the given condition, so we need to find the multiples of the above partitions that satisfy the condition $ap \ge 100$ and $bp \le 1000$
    For $a = 1,\ b = 495$
    $ap \ge 100 \Rightarrow p \ge 100$
    $bp \le 1000 \Rightarrow p \le \dfrac{1000}{495} \Rightarrow p \le 2$
    There is no value of $p$ satisfying the above inequalities.

    For $a = 9,\ b = 55$
    $9p \ge 100 \Rightarrow p \ge \dfrac{100}{9} \Rightarrow p \ge 12$
    $55p \le 1000 \Rightarrow p \le \dfrac{1000}{55} \Rightarrow p \le 18\dfrac{2}{11} \Rightarrow p \le 18$
    Therefore, $p = 12 \longrightarrow 18$, which means $p$ has $18 - 12 + 1 = 7$ valid values.

    For $a = 5,\ b = 99$
    $5p \ge 100 \Rightarrow p \ge 20$
    $99p \le 1000 \Rightarrow p \le 10\dfrac{10}{99} \Rightarrow p \le 10$
    There is no valid value of $p$ that satisfies this range.

    -----------book page break-----------
    For $a = 11,\ b = 45$
    $11p \ge 100 \Rightarrow p \ge 10$
    $45p \le 1000 \Rightarrow p \le \dfrac{200}{9} \Rightarrow p \le 22\dfrac{2}{9} \Rightarrow p \le 22$
    The valid values of $p$ range from $10$ to $22$, both values included, therefore there are $22 - 10 + 1 = 13$ valid values of $p$.

    The total number of valid values of $p$ is $7 + 13 = 20$



    Problem 19 of 30
    Let $AB$ be a diameter of a circle and let $C$ be a point on the segment $AB$ such that $AC:CB = 6:7$. Let $D$ be a point on the circle such that $DC$ is perpendicular to $AB$. Let $DE$ be the diameter through $D$. If $[XYZ]$ denotes the area of triangle $XYZ$, find $[ABD]/[CDE]$ to the nearest integer.
    Solution:
    -----------book page break-----------
    We can draw the diagram for the given problem as shown below:


    We have joined $AD$ and $BD$, extended $DC$ to meet the circle at $F$ and joined $EF$.
    Let $AC = 6x$, therefore, $CB = 7x$ and $AB = 13x$

    Let $DC = h$.
    $ar[\triangle ABD] = \dfrac{1}{2} DC \times AB = \dfrac{1}{2} h \times 13x = \dfrac{13}{2} hx$

    -----------book page break-----------
    $CO = CB - BO = 7x - \dfrac{13x}{2} = 0.5x$
    $\angle DFE = 90^\circ$, $\because$ it is the angle subtended by the diameter $DE$ on the circumference.
    $CF = DC = h$

    Considering $\triangle DCO$ and $\triangle DFE$,
    $\angle CDO$ is common.
    $\angle DCO = \angle DFE$   (both are $90^\circ$)

    $\therefore \dfrac{CO}{FE} = \dfrac{DC}{DF} = \dfrac{1}{2}$
    $\Rightarrow FE = 2CO = 2 \times 0.5x = x$

    $ar[\triangle CDE] = ar[\triangle DFE] - ar[\triangle CFE]$
    $= \dfrac{1}{2}2h\times x - \dfrac{1}{2} h\times x$
    $= \dfrac{1}{2} hx$

    $\therefore \dfrac{ar[\triangle ABD]}{ar[\triangle CDE]} = \dfrac{\frac{13}{2}hx}{\frac{1}{2}hx} = 13$


    Problem 20 of 30
    Consider the set $E$ of natural numbers $n \le 10000$ such that when divided by $11,\ 12,\ 13$, respectively, the remainders, in that order, are distinct prime numbers in an arithmetic progression.
    If $N$ is the largest number in $E$, find the sum of digits of $N$.
    Solution:
    Note: The original problem published for this exam did not specify any upper limit, hence was not solvable. We added the condition $n \le 10000$ to make this a valid problem which can be solved.

    We know that if any three integers form an $A.P$ series, one of them has to be divisible by $3$.
    Therefore, the only possibilities of the remainders to be prime and in $A.P$ series are $3,\ 5,\ 7$ or $7,\ 5,\ 3$ or $3,\ 7,\ 11$

    -----------book page break-----------
    $\underline{Case\ 1:}$
    Let the remainders when divided by $11,\ 12,\ 13$ be $3,\ 5,\ 7$ respectively.
    Therefore,
    $a \equiv 3\ (mod\ 11)$
    $a \equiv 5\ (mod\ 12)$
    $a \equiv 7\ (mod\ 13)$
    We will solve this using the Chinese Remainder Theorem explained .
    The product of the three divisors, $N$, is $11 \times 12 \times 13 = 1716$
    Now we can create the table we need to find the solution:
    $r_i$$N_i$$b_i$$a_i$
    $3$$156$
    $5$$143$
    $7$$132$

    Now, we find the multiplicative inverses of $N_i$ modulo $n_i$ for each $N_i$
    $156^{-1}\ (mod\ 11) \equiv 2^{-1}\ (mod\ 11) = 6$.

    Since these are small numbers we did this by visual inspection. For larger numbers you can use this  to find the inverses.
    Simlarly, $143^{-1}\ (mod\ 12) = 11^{-1}\ (mod\ 12) = 11$, and
    $132^{-1}\ (mod\ 13) = 2^{-1}\ (mod\ 13) = 7$

    Our completed table will be as follows:
    $r_i$$N_i$$b_i$$a_i$
    $3$$156$$6$$2808$
    $5$$143$$11$$7865$
    $7$$132$$7$$6468$

    -----------book page break-----------
    Therefore, the value of $a$ is:
    $(2808 + 7865 + 6468)\ mod\ 1716$
    $= (2808\ mod\ 1716) + (7865\ mod\ 1716) + (6468\ mod\ 1716)$
    $= 1092 + 1001 + 1320 = 3413$
    $\equiv 3413\ (mod\ 1716) = 1697$

    Now let us observe that any number of the form $1697 + 1716m$, where $m$ is an integer, will leave the same remainder when divided by the given divisors.
    $\therefore 1697 + 1716m \le 10000$
    $\Rightarrow 1716m \le 8303$
    $\Rightarrow m \le \dfrac{8303}{1716}$
    $\Rightarrow m \le 4\dfrac{1439}{1716}$
    The maximum value of $m$ is $4$.
    And the maximum value of $a$ is $1697 + 4\times 1716 = 8561$

    $\underline{Case\ 2:}$
    Let the remainders when divided by $11,\ 12,\ 13$ be $7,\ 5,\ 3$ respectively.
    Therefore,
    $n \equiv 7\ (mod\ 11)$
    $n \equiv 5\ (mod\ 12)$
    $n \equiv 3\ (mod\ 13)$

    For this case we can largely reuse the previous table, since the divisors are same $N_i$ and $b_i$ values will remain the same, and the $r_i$ values will be in reverse order.

    -----------book page break-----------
    So, we will get our table as:
    $r_i$$N_i$$b_i$$a_i$
    $7$$156$$6$$6552$
    $5$$143$$11$$7865$
    $3$$132$$7$$2772$

    Therefore, the value of $a$ in this case will be:
    $a \equiv (6552 + 7865 + 2772) (mod\ 1716)$
    $\equiv (6552\ mod\ 1716) + (7865\ mod\ 1716) + (2772\ mod\ 1716)$
    $= 1404 + 1001 + 1056 = 3461$
    $\equiv 3461\ (mod\ 1716) = 29$

    Using similar observations as in $Case\ 1$, any number of the form $29 + 1716m$, where $m$ is an integer will satisfy the given conditions.
    Therefore, $29 + 1716m \le 10000$
    $\Rightarrow 1716m \le 9971$
    $\Rightarrow m \le \dfrac{9971}{1716}$
    $\Rightarrow m \le 5\dfrac{107}{132}$
    The maximum value of $m$ is $5$.
    Therefore, the largest number $\le 10000$, giving these remainders is $29 + 5\times 1716 = 8609$

    $\underline{Case\ 3}$
    For $Case\ 3$, the remainders are $3,\ 7$ and $11$ when divided by $11,\ 12$ and $13$ respectively.

    -----------book page break-----------
    Therefore, we get our congruency relations as:
    $n \equiv 3\ (mod\ 11)$
    $n \equiv 7\ (mod\ 12)$
    $n \equiv 11\ (mod\ 13)$

    and our calculation table as:
    $r_i$$N_i$$b_i$$a_i$
    $3$$156$$6$$2808$
    $7$$143$$11$$11011$
    $11$$132$$7$$10164$

    Therefore, the value of $a$ is:
    $(2808 + 11011 + 10164)\ mod\ 1716$ 
    $=2808\ (mod\ 1716) + 11011\ (mod\ 1716 )+ 10164\ (mod\ 1716)$
    $=(1092 + 715 + 1584)\ mod 1716$
    $= 3391\ mod\ 1716$
    $= 1675$

    Like before, to find the maximum value less than $10000$ satisfying this condition, we use:
    $1675 + 1716m \le 10000$
    $\Rightarrow 1716m \le 10000 - 1675$
    $\Rightarrow 1716m \le 8325$
    $\Rightarrow m \le \dfrac{8325}{1716}$
    $\Rightarrow m \le 4\dfrac{487}{572}$
    $\therefore$ The highest integer value of $m$ is $4$

    -----------book page break-----------
    $\therefore$ The largest value, less than $10000$ satisfying the congruence relations for $Case\ 3$ is:
    $1675 + 1716 \times 4$
    $= 8539$

    Combining all the three cases above, we can see that $8609$ is the largest possible integer, less than $10000$ satisfying the given conditions.

    Therefore, the answer is, $8 + 6 + 0 + 9 = 23$





    Problem 21 of 30
    Consider the set $E = \{5,\ 6,\ 7,\ 8,\ 9\}$. For any partition of $\{A,\ B\}$ of $E$, with both $A$ and $B$ non-empty, consider the number obtained by adding the product of elements of $A$ to the product of elements of $B$. Let $N$ be the largest prime number among these numbers. Find the sum of the digits of $N$.
    Solution:
    Let us observe that if $m$ and $n$ are integers having a $gcd$ greater than $1$, then $m + n$ will also be divisible by that $gcd$.
    Therefore, for $A + B$ to be a prime, we are looking at values of $A$ and $B$ such that they are coprimes. It is obvious that the sum of products of any two non-empty subsets of the given set will be greater than $2$, we are look at odd prime numbers only.
    Therefore we have to keep all the even numbers in one set, let's say $A$
    $A = \{6,\ 8\}$

    Since $9$ shares a common factor with $6$, it cannot be kept in set $B$.
    Therefore, $A = \{6,\ 8,\ 9\}$ and the product of these elements is $432$

    Therefore, we are left with the following candidates, in order of size:
    $432 \times 7 + 5 = 3029$
    $432 \times 5 + 7 = 2167$
    $432 + 5 \times 7 = 467$

    Applying common divisibility rules, none of these numbers is divisible by $3$ or $5$, except $2167$ which is divisible by $11$, hence is not a prime number.
    Checking the divisibility of $3029$ by $7,\ 13...$, we see that it is divisible by $13$

    Therefore, the only possible candidate is $467$ which is not divisible by any prime number less than equal to $\left\lfloor\sqrt{467}\right\rfloor = 21$
    Therefore, $N = 467$ and the sum of its digits is $17$

    Problem 22 of 30
    What is the greatest integer not exceeding the sum $\sum\limits_{n = 1}^{1599} \dfrac{1}{\sqrt{n}}$?
    Solution:
    The given series cannot be directly mapped to a telescoping series. However, with a little observation we can find out an upper bound and a lower bound for the series, each of which can be mapped to a telescoping series.

    Let us observe that:
    $\dfrac{1}{\sqrt{x}} = \dfrac{2}{2\sqrt{x}} = \dfrac{2}{\sqrt{x} + \sqrt{x}}$
    For positive square roots:
    $\sqrt{x} \lt \sqrt{x + 1}$
    $\therefore \sqrt{x} + \sqrt{x} \lt \sqrt{x} + \sqrt{x + 1}$

    -----------book page break-----------
    $\therefore \dfrac{1}{\sqrt{x} + \sqrt{x}} \gt \dfrac{1}{\sqrt{x} + \sqrt{x + 1}}$
    $\Rightarrow \dfrac{2}{\sqrt{x} + \sqrt{x}} \gt  \dfrac{2}{\sqrt{x} + \sqrt{x + 1}}$

    Therefore,
    $\dfrac{1}{\sqrt{n}} \gt \dfrac{2}{\sqrt{n} + \sqrt{n + 1}}$

    $\Rightarrow \sum\limits_{n = 1}^{1599} \dfrac{1}{\sqrt{n}} \gt \sum\limits_{n = 1}^{1599} \dfrac{2}{\sqrt{n} + \sqrt{n + 1}}$

    Similarly, we can find the series which is forms the upper bound for the given series.
    For $x \ge 1$
    $\sqrt{x} \lt \sqrt{x - 1}$
    $\Rightarrow \sqrt{x} + \sqrt{x} \gt \sqrt{x} + \sqrt{x - 1}$
    $\Rightarrow \dfrac{1}{\sqrt{x} + \sqrt{x}} \lt \dfrac{1}{\sqrt{x} + \sqrt{x - 1}}$
    $\Rightarrow \dfrac{2}{\sqrt{x} + \sqrt{x}} \lt \dfrac{2}{\sqrt{x} + \sqrt{x - 1}}$

    Therefore,
    $\dfrac{1}{\sqrt{n}} \lt \dfrac{2}{\sqrt{n} + \sqrt{n - 1}}$

    $\Rightarrow \sum\limits_{n = 1}^{1599} \dfrac{1}{\sqrt{n}} \lt \sum\limits_{n = 1}^{1599} \dfrac{2}{\sqrt{n} + \sqrt{n - 1}}$

    -----------book page break-----------
    Combining the upper and the lower bounds we get:

    $\sum\limits_{n = 1}^{1599} \dfrac{2}{\sqrt{n} + \sqrt{n + 1}} \lt \sum\limits_{n = 1}^{1599} \dfrac{1}{\sqrt{n}} \lt \sum\limits_{n = 1}^{1599} \dfrac{2}{\sqrt{n} + \sqrt{n - 1}}$

    Now we can evaluate the lower bound using telescoping technique described .
    $\sum\limits_{n = 1}^{1599} \dfrac{2}{\sqrt{n} + \sqrt{n + 1}}$

    $= \dfrac{2}{\sqrt{1} + \sqrt{2}} + \dfrac{2}{\sqrt{2} + \sqrt{3}} + ... + \dfrac{2}{\sqrt{1599} + \sqrt{1600}}$

    $= 2\left\{\dfrac{1}{\sqrt{1} + \sqrt{2}} + \dfrac{1}{\sqrt{2} + \sqrt{3}} + ... + \dfrac{1}{\sqrt{1599} + \sqrt{1600}} \right\}$

    $= 2\left\{\dfrac{\sqrt{2} - \sqrt{1}}{(\sqrt{1} + \sqrt{2})(\sqrt{2} - \sqrt{1})} + \dfrac{\sqrt{3} - \sqrt{2}}{(\sqrt{2} + \sqrt{3})(\sqrt{3} - \sqrt{2})} + ... + \dfrac{\sqrt{1600} - \sqrt{1599}}{(\sqrt{1599} + \sqrt{1600})(\sqrt{1600} - \sqrt{1599})} \right\}$

    $= 2\left\{\sqrt{2} - \sqrt{1} + \sqrt{3} - \sqrt{2} + ... + \sqrt{1600} - \sqrt{1599} \right\}$

    $= 2\left\{\sqrt{1600} - \sqrt{1} \right\}$

    $= 2 \times 39 = 78$

    -----------book page break-----------
    We can evaluate the upper bound in the same way and get:
    $\sum\limits_{n = 1}^{1599} \dfrac{2}{\sqrt{n} + \sqrt{n - 1}}$

    $=  2\left\{\dfrac{1}{\sqrt{1} + \sqrt{0}} + \dfrac{1}{\sqrt{2} + \sqrt{1}} + ... + \dfrac{1}{\sqrt{1599} + \sqrt{1598}}\right\}$

    $= 2\left\{\sqrt{1} - \sqrt{0} + \sqrt{2} - \sqrt{1} + ... +  \sqrt{1599} - \sqrt{1598} \right\}$

    $= 2\left\{\sqrt{1599} - \sqrt{0} \right\}$

    $= 2 \sqrt{1599} = 2 \times 39.99 = 79.98$

    Now we can see that although we have a close upper and lower bound, they are not close enough to give a unique answer.
    Since the first term $\dfrac{1}{\sqrt{1}}$ is an integer, we can eliminate that from the computation of the lower and upper bounds and add it back later.

    Thus we get:
    $\sum\limits_{n = 2}^{1599} \dfrac{2}{\sqrt{n} + \sqrt{n + 1}} \lt \sum\limits_{n = 2}^{1599} \dfrac{1}{\sqrt{n}} \lt \sum\limits_{n = 2}^{1599} \dfrac{2}{\sqrt{n} + \sqrt{n - 1}}$

    -----------book page break-----------
    Evaluating the bounds in the same way, using telescoping, we get:

    $2\left\{\sqrt{1600} - \sqrt{2} \right\} \lt \sum\limits_{n = 2}^{1599} \dfrac{1}{\sqrt{n}} \lt 2\left\{\sqrt{1599} - \sqrt{1} \right\}$

    $\Rightarrow 2\left\{40 - 1.41 \right\} \lt \sum\limits_{n = 2}^{1599} \dfrac{1}{\sqrt{n}} \lt 2\left\{39.99 - 1 \right\}$

    $\Rightarrow 2\left\{40 - 1.41 \right\} \lt \sum\limits_{n = 2}^{1599} \dfrac{1}{\sqrt{n}} \lt 2\left\{39.99 - 1 \right\}$

    $\Rightarrow 2\left\{38.59 \right\} \lt \sum\limits_{n = 2}^{1599} \dfrac{1}{\sqrt{n}} \lt 2\left\{38.99\right\}$

    $\Rightarrow 77.18 \lt \sum\limits_{n = 2}^{1599} \dfrac{1}{\sqrt{n}} \lt 77.98$

    Now adding the first term for $n = 1$ to all parts of the inequality above, we get:

    $\Rightarrow 77.18 + 1 \lt \sum\limits_{n = 1}^{1599} \dfrac{1}{\sqrt{n}} \lt 77.98 + 1$

    $\Rightarrow 78.18 \lt \sum\limits_{n = 1}^{1599} \dfrac{1}{\sqrt{n}} \lt 78.98$

    Now, since our upper and lower bound both are $78.xxx$ the greatest integer not exceeding the sum is $78$.

    -----------book page break-----------
    We will spend a few more minutes understanding why it did not work, when we did the sum from $n = 1$ but worked when we took the sum from $n = 2$ and added back the value for $n = 1$ to our functions.
    Let us take a look at the plot of the function and the upper and lower bounds as shown below:



    The function has been plotted from $x = 1 \longrightarrow 10$
    The red line is the plot of our function
    $f(x) = \dfrac{1}{\sqrt{x}}$

    -----------book page break-----------
    The blue and the green lines show the upper and the lower bounds respectively.
    Let us observe that the errors between the actual value and the upper bound and the lower bound, which is shown by the difference in $y$ values at each $x$, is maximum at $x = 1$, and reduces as $x$ increases.
    When we computed the sum from $n = 2$, we eliminated $n = 1$, which in turn, eliminated the maximum error from the sum.
    Then we added back $1$ to the actual sum and the bounds, which means we added the actual value of $f(1)$ to both the bounds, eliminating the errors at $n = 1$ from our evaluation.


    Problem 23 of 30
    Let $ABCD$ be a convex cyclic quadrilateral. Suppose $P$ is a point in the plane of the quadrilateral such that the sum of its distances from the vertices of the $ABCD$ is the least.
    If $\{PA,\ PB,\ PC,\ PD\} = \{3,\ 4,\ 6,\ 8\}$ 
    what is the maximum possible area of $ABCD$?
    Solution:
    Before we draw the diagram for this problem, let us make some observations about the problem.
     
    Let $f(A, C)$ denote the value of the sum of the distances of point $P$ inside quadrilateral $ABCD$ from opposite vertices $A$ and $C$.
    The sum of all four distances can be written as $f(A,C) + f(B,D)$.
    Since $f$ is a positive function for all points $P$ inside $ABCD$, the sum $f(A, C) + f(B, D)$ is minimum when both of them are minimum individually.
    Applying the triangle inequality rule, it is easy to see that the sum of the distances $f(A,C)$ of point $P$ from opposite vertices $A$ and $C$ is minimum when $P$ is any point on the diagonal $AC$.

    -----------book page break-----------
    Therefore, $f(A,C) + f(B,D)$ is minimum when $P$ lies on both $AC$ and $BD$ and the only such point is the intersection point of $AC$ and $BD$.
    Therefore, the point $P$ is the intersection point of the two diagonals.

    Since. the dimensions of the distances are given as a set, and the elements of a set are not ordered, the dimensions of $PA$, $PB$, $PC$ and $PD$ can be any of the given values.
    Since, $ABCD$ is a cyclic quadrilateral we know that:
    $PA \times PC = PB \times PD$.
    The only partition of values in the given set that satisfies this criterion, are $\{3,8\}$ and $\{4,6\}$.
    We can choose any pair for any diagonal without loosing the accuracy of the result.
    Let us choose $AP = 3,\ BP = 4,\ CP = 8$ and $DP = 6$

    Given any two sides of a triangle $a, b$, and the included angle $\theta$, the area of the triangle is given by:
    $\dfrac{1}{2} a\times b \times sin\theta$   (using the $sine\ rule$ explained ).
    We know that the maximum value of $sin\theta$ is $1$ when $\theta = 90^\circ$

    Therefore the areas of the four triangle formed by the intersecting diagonals will be maximum when the two diagonals intersect each other at $90^\circ$.

    -----------book page break-----------
    Therefore, the quadrilater $ABCD$ and the point $P$ can be drawn as follows:


    The maximum area of the quadrilateral $ABCD$
    $ar[\triangle APB] + ar[\triangle BPC] + ar[\triangle DPC] + ar[\triangle DPA]$

    $= \dfrac{1}{2} AP \times PB + \dfrac{1}{2} BP \times PC + \dfrac{1}{2} CP \times PD + \dfrac{1}{2} DP \times PA$

    $= \dfrac{1}{2} 3 \times 4 + \dfrac{1}{2} 4 \times 8 + \dfrac{1}{2} 8 \times 6 + \dfrac{1}{2} 6 \times 3$

    $= 6 + 16 + 24 + 9 = 55$


    Problem 24 of 30
    A $1 \times n$ rectangle is divided into $n$ unit $(1 \times 1)$ squares. Each square of this rectangle is coloured red, blue or green. Let $f(n)$ be the number of colourings of the rectangle in which there are an even number of red squares. What is the largest prime factor of $f(9)/f(3)$? (The number of red squares can be zero).
    Solution:
    Out of $n$ squares the number of red squares, $r$, can be $\{0,\ 2,\ 4,\ ...\}$.
    The ways of choosing $r$ squares out of $n$ is

    $\xacomb{n}{r}$.

    For each of these choices, the remaining square can be coloured, either blue or green, therefore there are $2^{n-r}$ ways of colouring them.
    Therefore, the total number of ways of colouring with the number of red squares $= r$, is:
    $\xacomb{n}{r} \times 2^{n - r}$   where $r$ is even, and $r \le n$

    -----------book page break-----------
    Therefore,
    $f(n) = \displaystyle\sum\limits_{0 \le r \lt n,\ r\ even}\xacomb{n}{r} \times 2^{n - r}$
    When, $n$ is odd:
    $f(n) = \xacomb{n}{0} \times 2^{n} + \xacomb{n}{2} \times 2^{n-2} + ... + \xacomb{n}{n-1} \times 2^{1}$

    $\therefore 2f(n) = 2\times \xacomb{n}{0} \times 2^{n} + 2\times \xacomb{n}{2} \times 2^{n-2} + ... + 2\times \xacomb{n}{n-1} \times 2^{1}$

    If we add all the terms of the form $\xacomb{n}{q} \times 2^{n-q}$ where $q$ is odd and $q = 1\longrightarrow n$ and subtract them back, we get:
    $2f(n) = (2\times \xacomb{n}{0} \times 2^{n} + 2\times \xacomb{n}{2} \times 2^{n-2} + ... + 2\times \xacomb{n}{n-1} \times 2^{1})$
               $+ (\xacomb{n}{1} \times 2^{n-1} + \xacomb{n}{3} \times 2^{n-3} + ... + \xacomb{n}{n} \times 2^{0})$
               $- (\xacomb{n}{1} \times 2^{n-1} + \xacomb{n}{3} \times 2^{n-3} + ... + \xacomb{n}{n} \times 2^{0})$

    Now we have two terms, each with $r = even$ and one term with $r = odd$ with the $\unicode{0x201C}+\unicode{0x201D}$ sign and one term $r = odd$ with $\unicode{0x201C}-\unicode{0x201D}$ sign.
    We can club each of the even $r$ term with one positive odd $r$ and one negative odd $r$ to get:
    $2f(n) = (\xacomb{n}{0} \times 2^{n} + \xacomb{n}{1} \times 2^{n-1} + ... + \xacomb{n}{n} \times 2^{0})$
              $+ (\xacomb{n}{0} \times 2^{n} - \xacomb{n}{1} \times 2^{n-1} + ... - \xacomb{n}{n} \times 2^{0})$

    Each of the terms in the two series above can be written as:
    $\xacomb{n}{r} \times 2^{n-r}.1^r$ where $r = 1 \longrightarrow n$
    These series are the binomial expansions of $(2 + 1)^n$ and $(2 - 1)^n$ respectively.
    Therfore,
    $2f(n) = (2 + 1)^n + (2 - 1)^n$

    $\Rightarrow f(n) = \dfrac{(2 + 1)^n + (2 - 1)^n}{2} = \dfrac{3^n + 1}{2}$

    -----------book page break-----------
    $\dfrac{f(9)}{f(3)} = \dfrac{3^9 + 1}{3^3 + 1}$

    $= \dfrac{(3^3 + 1)(3^6 - 3^3.1 + 1}{3^3 + 1}$

    $= 3^6 - 3^3 + 1$

    $= 3^3(3^3 - 1) + 1$

    $= 3^3.26 + 1$

    $= 27.26 + 1$

    $= 703$

    Because,
    $703 \equiv 3\ (mod\ 10) \equiv 1 \times 3\ (mod 10) \equiv 7 \times 9\ (mod\ 10)$

    The last digits of the factors can only be $1,\ 3,\ 7$ and $9$
    The number $703$ is not divisible by $3$ or $9$ or $11$ we can try with
    Trying with $7,\ 17,\ 19$ we get our first factor as $19$, therefore the other factor is $37$
    Hence the answer is $37$


    Problem 25 of 30
    A village has a circular wall around it, and the wall has four gates pointing north, south, east and west. A tree stands outside the village, $16\ m$ north of the north gate, and it can be just seen appearing on the horizon from a point $48\ m$ east of the south gate. What is the diameter, in meters, of the wall that surrounds the village?
    Solution:
    -----------book page break-----------
    We can draw the diagram for this problem as follows:



    The point $P$ denotes the position of the tree, and the point $R$ denotes the position of the observer, $N$ and $S$ are the north and south gates respectively. Given that $PN = 16$ and $SR = 48$
    Since $P$ is just visible to $R$, $PR$ is a tangent to the circular wall at $T$ as shown in the diagram, also $SR$ is the tangent to the circle at $S$.

    -----------book page break-----------
    $\triangle POT$ is right angled at $T$, therefore,
    $PO^2 = OT^2 + PT^2$
    $\Rightarrow (16 + r)^2 = r^2 + PT^2$      where $r$ is the radius of the circle
    $\Rightarrow PT^2 = (16 + r)^2 - r^2$
    $\Rightarrow PT = \sqrt{16(16 + 2r)}$

    $\triangle PTO \sim \triangle PSR$

    $\therefore \dfrac{PT}{r} = \dfrac{16 + 2r}{48}$

    $\Rightarrow \dfrac{\sqrt{16(16 + 2r)}}{r} = \dfrac{16 + 2r}{48}$

    $\Rightarrow \dfrac{4\sqrt{(16 + 2r)}}{r} = \dfrac{16 + 2r}{48}$

    $\Rightarrow \dfrac{4}{r} = \dfrac{\sqrt{(16 + 2r)}}{48}$

    $\Rightarrow 48 \times 4 = r\sqrt{(16 + 2r)}$

    $\Rightarrow 48 \times 4 = r\sqrt{2}\sqrt{(8 + r)}$

    $\Rightarrow 48 \times 2\sqrt{2} = r\sqrt{(8 + r)}$

    $\Rightarrow 96\sqrt{2} = r\sqrt{(8 + r)}$

    If we want to solve the above equation in the conventional way we will end up with a non-trivial cubic equation to solve for.

    -----------book page break-----------
    Rather we can take a visual inspection approach, to solve this.
    On the $LHS$ we have $96\sqrt{2}$
    Therefore, the expression under the square root $(r + 8)$ should be of the form $p \times 2$ where $p$ is a perfect square.
    So, we can try with $p = 0,\ 1,\ 4,\ 9,\ 16,\ 25...$ and see which value of $r$ satisfies:

    $96\sqrt{2} = r\sqrt{(8 + r)}$
    If we put $r + 8 = 0 \times 2$ then we get a negative value of $r$ which is not possible.
    If $r + 8 = 1 \times 2$ then also we get $r$ as negative.
    If $r + 8 = 4 \times 2 \Rightarrow r = 0$ which does not satisfy the equation.
    If $r + 8 = 9 \times 2 \Rightarrow r = 10 \Rightarrow r\sqrt{(8 + r)} = 30\sqrt{2}$    this does not satisfy the equation.  
    If $r + 8 = 16 \times 2 \Rightarrow r = 24 \Rightarrow r\sqrt{(8 + r)} = 96\sqrt{2}$ satisfies the equation.

    Therefore, $r = 24$ and the diameter is $48$.


    Problem 26 of 30
    Positive integers $x,\ y,\ z$ satisfy $xy + z = 160$. Compute the smallest possible value of $x + yz$.
    Solution:
    Let  $x + yz = M$
    Since $x,\ y,\ z$ are positive integers $M$ is also a positive integer.
    To minimize the given expression, we need to minimize $y$ and $z$ since they appear in the product.

    Given that $xy + z = 160$
    $\Rightarrow x = \dfrac{160 - z}{y}$

    Substituting this value of $x$ in the given equation, we get:
    $\dfrac{160 - z}{y} + yz = M$

    -----------book page break-----------
    Since $yz$ and $M$ are integers, $\dfrac{160-z}{y}$ is also an integer.
    Therefore, $y$ is a divisor of $160 - z$. Since our aim is to minimize $yz$, we will start with the minimum value of $z$.
    For $z = 1$, $160 - z = 159$, and the divisors are $1, 3, 53, 159$
    If $y = 1$, $M = 159 + 1 = 160$
    If $y = 3$, $M = 53 + 3 = 56$
    If $y = 53$, $M = 3 + 53 = 56$
    If $y = 159$, $M = 1 + 159 = 160$
    Since we go the minimum value of $M$ as $56$, we will ignore all values of $y,\ z \gt 56$

    For $z = 2$, $160 - z = 158$, and the divisors are $1, 2, 79$. Since we already tried $1$ and $79 \gt 56$ we will ignore these as values of $y$.
    If $y = 2$, $M = 79 + 4 = 83$

    For $z = 3$, $160 - z = 157$, this is a prime number with no factor less than $56$

    For $z = 4$, $160 - z  = 156$ and the divisors are $1,\ 2,\ 4,\ 6,\ 12,\ 13$. We have already tried $y = 1,\ 2$ so we will start with $4$
    If $y = 4$, $M = 39 + 16 = 55$
    If $y = 6$, $M = 26 + 24 = 50$
    If $y = 12$, $M = 13 + 48 = 61$
    If $y = 13$, $M = 12 + 52 = 64$

    So far we have tried the following values of $y = 1,\ 2,\ 3,\ 4,\ 6,\ 12,\ 13$. And it appears that $M$ is a decreasing then increasing function, and so far our minimum $M$ is for $y = 6$

    -----------book page break-----------
    To ensure that we have the actual minimum we will find the value of $M$ by taking $y = 5$.
    $y = 5$ is possible for the minimum positive $z = 5$
    $M = \dfrac{160 - 5}{5} + 25 = 31 + 25 = 56$

    Therefore, the minimum value is $50$.


    Problem 27 of 30
    We will say that a rearrangement of the letters of a word has $no\ fixed\ letters$ if, when the rearrangement is placed directly below the word, no column has the same letter repeated.
    For instance $H\ B\ R\ A\ T\ A$ is a rearrangement with no fixed letters of $B\ H\ A\ R\ A\ T$ How many distinguishable rearrangements with no fixed letters does $B\ H\ A\ R\ A\ T$ have? (The two $A$s are considered identical.)
    Solution:
    Since we need to find out the solutions where no letter is allowed to occupy its original position, it is clearly a $derangement$ problem as explained .

    So we begin by treating the two $A$s as distinct letters by given them suffixes, and our word becomes:
    $B\ H\ A_1\ R\ A_2\ T$

    The number of possible derangements with all unique letters is given by:

    $!6 = 6! \displaystyle\sum\limits_{k = 0}^{6} \dfrac{(-1)^k}{k!}$

    -----------book page break-----------
    $= 6! \left\{\dfrac{(-1)^0}{0!} + \dfrac{(-1)^1}{1!} + \dfrac{(-1)^2}{2!} + \dfrac{(-1)^3}{3!} + \dfrac{(-1)^4}{4!} + \dfrac{(-1)^5}{5!} + \dfrac{(-1)^6}{6!}\right\}$

    $= 6! \left\{1 - \dfrac{1}{1!} + \dfrac{1}{2!} - \dfrac{1}{3!} + \dfrac{1}{4!} - \dfrac{1}{5!} + \dfrac{1}{6!}\right\}$

    $= 6! - \dfrac{6!}{1!} + \dfrac{6!}{2!} - \dfrac{6!}{3!} + \dfrac{6!}{4!} - \dfrac{6!}{5!} + \dfrac{6!}{6!}$

    $= 720 - 720 + 360 - 120 + 30 - 6 + 1$

    $= 265$

    The above count will include the derangements of $A_1$ and $A_2$.
    The cases where $A_1$ will appear in the original position of $A_2$ and $A_2$ will $NOT$ appear in the original position of $A_1$ $= !5$
    The cases where $A_2$ will appear in the original position of $A_1$ and $A_1$ will $NOT$ appear in the original position of $A_2$ $= !5$
    The cases where $A_2$ will appear in the original position of $A_1$ and $A_1$ will appear in the original position of $A_2$ $= !4$
    Hence, the count becomes
    $265 - !5 - !5 - !4$

    $!5 = 5! - \dfrac{5!}{1!} + \dfrac{5!}{2!} - \dfrac{5!}{3!} + \dfrac{5!}{4!} - \dfrac{5!}{5!}$

    $= 120 - 120 + 60 - 20 + 5 - 1 = 44$

    And
    $!4 = 4! - \dfrac{4!}{1!} + \dfrac{4!}{2!} - \dfrac{4!}{3!} + \dfrac{4!}{4!}$

    -----------book page break-----------
    $= 24 - 24 + 12 - 4 + 1 = 9$

    Therefore, our count so far is:
    $265 - 44 - 44 - 9 = 168$

    Each one of these counts treats $A_1$ and $A_2$ as distinct, but since they are identical we need to divide our result by $2!$, and our final result is:
    $\dfrac{168}{2!} = 84$ 


    Problem 28 of 30
    Let $ABC$ be a triangle with sides $51,\ 52,\ 53$. Let $\Omega$ denote the incircle of $\triangle ABC$. Draw tangents to $\Omega$ which are parallel to the sides of $ABC$. Let $r_1$, $r_2$, $r_3$ be the inradii of the three corner triangles so formed. Find the largest integer that does not exceed $r_1 + r_2 + r_3$.
    Solution:
    We can find the area of $\triangle ABC$ using $Heron's\ Formula$.
    The semiperimeter $s$ is given by:
    $s = \dfrac{51 + 52 + 53}{2} = 78$

    $\therefore ar[\triangle ABC] = \sqrt{78(78 - 51)(78 - 52)(78 - 53)}$

    $\therefore ar[\triangle ABC] = \sqrt{78(27)(26)(25)} = \sqrt{13 \times 3 \times 2 \times 3 \times 9 \times 2 \times 13 \times 25}$

    $= 13 \times 3 \times 3 \times 2 \times 5$

    -----------book page break-----------
    We also know from , that the area of a triangle is $inradius \times semiperimeter$

    $\therefore r_\Omega \times 78 = 13 \times 3 \times 3 \times 2 \times 5$ where $r_\Omega$ is the radius of incircle $\Omega$

    $\Rightarrow r_\Omega = 3 \times 5 = 15$

    Now that we have the basic dimensions in place we can draw the diagram as shown below:


    We have drawn the altitude $AD$, the line $PQ$ parallel to $BC$ and tangent to $\Omega$ at $R$. We have joined $RS$ where $S$ is the point of contact of $\Omega$ with $BC$. Let $AD$ intersect $PQ$ at $M$.

    -----------book page break-----------
    Since, $RS$ joins two parallel tangents of the circle $\Omega$, $RS$ is the diameter of $\Omega$ and is perpendicular to $BC$ and $PQ$.
    $\therefore MDSR$ is a rectangle.
    $PQ \parallel BC$ $\triangle APQ \sim \triangle ABC$.
    Therefore $AM$ is the altitude of $\triangle APQ$
    Let $r_1$ be the inradius of $APQ$.
    Since the $\triangle$s $ABC$ and $APQ$ are similar, all their dimensions are in proportion,
    $\therefore \dfrac{r_1}{r_\Omega} = \dfrac{AM}{AD}$ 
    $AM = AD - MD = AD - RS = AD - 2r_\Omega$

    $\therefore \dfrac{r_1}{r_\Omega} = \dfrac{AD - 2r_\Omega}{AD} = 1 - \dfrac{2r_\Omega}{AD}$

    $\because AD$ is the altitude of $\triangle ABC$,
    $\dfrac{1}{2}AD \times BC = ar[ABC]$
    $\Rightarrow AD = \dfrac{2\times ar[ABC]}{BC}$

    $\therefore \dfrac{r_1}{r_\Omega} = 1 - \dfrac{2r_\Omega}{AD} = 1 - \dfrac{2r_\Omega \times BC}{2\times ar[ABC]} = 1 - \dfrac{r_\Omega \times BC}{ar[ABC]}$

    Similarly, if $r_2$ and $r_3$ are the inradii of the corner triangles formed at $B$ and $C$ respectively, then:
    $\dfrac{r_2}{r_\Omega} = 1 - \dfrac{r_\Omega \times CA}{ar[ABC]}$ and
    $\dfrac{r_3}{r_\Omega} = 1 - \dfrac{r_\Omega \times AB}{ar[ABC]}$

    -----------book page break-----------
    Therefore,
    $\dfrac{r_2}{r_\Omega} + \dfrac{r_2}{r_\Omega} + \dfrac{r_2}{r_\Omega} = 3 - \dfrac{r_\Omega(AB + BC + CA)}{ar[ABC]}$

    $\Rightarrow \dfrac{r_1 + r_2 + r_3}{r_\Omega} = 3 - \dfrac{r_\Omega(2s)}{ar[ABC]}$

    $\Rightarrow \dfrac{r_1 + r_2 + r_3}{r_\Omega} = 3 - \dfrac{r_\Omega(2s)}{r_\Omega \times s}$     $\because$ area of a triangle $= inradius \times semiperimeter$

    $\Rightarrow \dfrac{r_1 + r_2 + r_3}{r_\Omega} = 3 - 2 = 1$

    $\Rightarrow r_1 + r_2 + r_3 = r_\Omega$

    We have seen before that $r_\Omega = 15$
    $\therefore r_1 + r_2 + r_3 = 15$


    Problem 29 of 30
    In triangle $ABC$, the median $AD$ (with $D$ on $BC$) and the angle bisector $BE$ (with $E$ on $AC$) are perpendicular to each other. If $AD = 7$ and $BE = 9$, find the integer nearest to the area of triangle $ABC$.
    Solution:
    The diagram for this problem can be drawn as shown below:


    Let us call the intersection point of $AD$ and $BE$ as $G$.

    -----------book page break-----------
    Considering $\triangle ABG$ and $\triangle DBG$

    $\angle DBG = \angle ABG$     $\because BG$ bisects $\angle ABD$

    $\angle BGD = \angle AGD$     $\because$ both are $90^\circ$

    $BG$ is common.

    $\therefore \triangle ABG \cong \triangle DBG$

    $\therefore AB = BD$ and

    $AG = GD = \dfrac{AD}{2} = \dfrac{7}{2}$

    $BD = DC$   $\because D$ is the midpoint of $BC$
    $\therefore BC = 2AB \Rightarrow BC:AB = 1:2$

    $\therefore AE:EC = 1:2$     $\because$ angle bisector bisects the opposite side in the ratio of the adjacent sides.

    $ar[\triangle ABE]:ar[\triangle CBE] = 1:2$   $\because$ they share the same base $AC$ and has the same vertex $B$.

    $ar [\triangle ABE] = \dfrac{1}{2} \times BE \times AG = \dfrac{1}{2} \times 9 \times \dfrac{7}{2} = \dfrac{63}{4}$

    $ar [\triangle CBE] = 2 \times ar[\triangle ABE] = 2 \times \dfrac{63}{4} = \dfrac{63}{2}$

    $ar [\triangle ABC] = ar[\triangle ABE] + ar[\triangle CBE] = \dfrac{63}{4} + \dfrac{63}{2}$

    -----------book page break-----------
    $=\dfrac{3}{4} \times 63 = \dfrac{189}{4} = 47\dfrac{1}{4}$

    $\therefore$ The integer nearest to the value of the area is $47$. 

    Problem 30 of 30
    Let $E$ denote the set of all natural numbers $n$ such that $3 \lt n \lt 100$ and the set $\{1,\ 2,\ 3,\ ...,\ n\}$ can be partitioned in to $3$ subsets with equal sums. Find the number of elements of $E$.
    Solution:
    A finite set of integers $S$ can be partitioned into three subsets, each totalling to the same sum, only when the sum of the elements of $S$ is divisible by $3$.
    In this case, the elements happen to be the first $N$ natural numbers for some $n = N$
    Therefore, the sum of the elements of $S_N$ is:
    $\dfrac{N(N+1)}{2}$
    The sum will be divisible by $3$ if either $N$ or $N+1$ is divisible by $3$.

    If $N$ is divisible by $3$
    $N = 3k$ where $3 \lt N \lt 100$
    $\therefore 3 \lt 3k \lt 100$
    $\Rightarrow 1 \lt k \lt 33\dfrac{1}{3}$
    Therefore $k$ ranges from $2$ to $33$, giving a total of $32$ possible values of $k$.

    Similarly, if $N + 1$ is divisible by $3$
    $N + 1= 3k$
    $\Rightarrow N = 3k - 1$ where
    $3 \lt 3k - 1 \lt 100$
    $4 \lt 3k \lt 101$
    $1\dfrac{1}{3} \lt k \lt 33\dfrac{2}{3}$
    Therefore $k$ ranges from $2$ to $33$, giving another $32$ possible values.

    There is no value of $N$, where both $N$ and $N+1$ are divisible by $3$, therefore the two cases are mutually exclusive.
    The total number of $N$ satisfying the given condition is $32 + 32 = 64$