exam: HMMT

problem: Evaluate the functions $\phi(n), \sigma(n)$, and $\tau(n)$ for $n=12, n=2007$, and $n=2^{2007}$.

solution:
For $n=12=2^{2} \cdot 3^{1}$,

$$
\phi(12)=2(2-1)(3-1)=4, \quad \sigma(12)=(1+2+4)(1+3)=28, \quad \tau(12)=(2+1)(1+1)=6
$$

for $n=2007=3^{2} \cdot 223$,
$\phi(2007)=3(3-1)(223-1)=1332, \quad \sigma(2007)=(1+3+9)(1+223)=2912, \quad \tau(2007)=(2+1)(1+1)=6 ;$
and for $n=2^{2007}$,

$$
\phi\left(2^{2007}\right)=2^{2006}, \quad \sigma\left(2^{2007}\right)=\left(1+2+\cdots+2^{2007}\right)=2^{2008}-1, \quad \tau\left(2^{2007}\right)=2007+1=2008
$$

solution_match: Solution.


problem: Solve for the positive integer(s) $n$ such that $\phi\left(n^{2}\right)=1000 \phi(n)$.

solution_match: Answer:


solution: The unique solution is $n=1000$. For, $\phi(p n)=p \phi(n)$ for every prime $p$ dividing $n$, so that $\phi\left(n^{2}\right)=n \phi(n)$ for all positive integers $n$.


problem:
Prove that for every integer $n$ greater than 1 ,

$$
\sigma(n) \phi(n) \leq n^{2}-1
$$

When does equality hold?

solution:
Note that

$$
\sigma(m n) \phi(m n)=\sigma(m) \phi(m) \sigma(n) \phi(n) \leq\left(m^{2}-1\right)\left(n^{2}-1\right)=(m n)^{2}-\left(m^{2}+n^{2}-1\right)<(m n)^{2}-1
$$

for any pair of relatively prime positive integers $(m, n)$ other than $(1,1)$. Now, for $p$ a prime and $k$ a positive integer, $\sigma\left(p^{k}\right)=1+p+\cdots+p^{k}=\frac{p^{k+1}-1}{p-1}$ and $\phi\left(p^{k}\right)=p^{k}-\frac{1}{p} \cdot p^{k}=(p-1) p^{k-1}$. Thus,

$$
\sigma\left(p^{k}\right) \phi\left(p^{k}\right)=\frac{p^{k+1}-1}{p-1} \cdot(p-1) p^{k-1}=\left(p^{k+1}-1\right) p^{k-1}=p^{2 k}-p^{k-1} \leq p^{2 k}-1
$$

with equality where $k=1$. It follows that equality holds in the given inequality if and only if $n$ is prime.


problem:
Prove the identity

$$
\sum_{d \mid n} \tau(d)^{3}=\left(\sum_{d \mid n} \tau(d)\right)^{2}
$$

solution:
Note that $\tau^{3}$ is multiplicative; in light of the convolution property just shown, it follows that both sides of the posed equality are multiplicative. Thus, it would suffice to prove the claim for $n$ a power of a prime. So, write $n=p^{k}$ where $p$ is a prime and $k$ is a nonnegative integer. Then

$$
\begin{aligned}
& \sum_{d \mid n} \tau(d)^{3}=\sum_{i=0}^{k} \tau\left(p^{i}\right)^{3}=\sum_{i=0}^{k}(i+1)^{3} \\
& \quad=1^{3}+\cdots+(k+1)^{3}=\frac{(k+1)^{2}(k+2)^{2}}{4}=\left(\frac{(k+1)(k+2)}{2}\right)^{2} \\
& \quad=\left(\sum_{i=0}^{k} \tau\left(p^{i}\right)\right)^{2}=\left(\sum_{d \mid n} \tau(d)\right)^{2}
\end{aligned}
$$

as required.


problem:
Show that for positive integers $n$,

$$
\sum_{d \mid n} \phi(d)=n
$$

solution:
Both sides are multiplicative functions of $n$, the right side trivially and the left because for relatively prime positive integers $n$ and $n^{\prime}$,

$$
\left(\sum_{d \mid n} \phi(d)\right)\left(\sum_{d^{\prime} \mid n^{\prime}} \phi\left(d^{\prime}\right)\right)=\sum_{d\left|n, d^{\prime}\right| n^{\prime}} \phi(d) \phi\left(d^{\prime}\right),
$$

and $\phi(d) \phi\left(d^{\prime}\right)=\phi\left(d d^{\prime}\right)$. The identity is then easy to check; since $\phi\left(p^{k}\right)=p^{k-1}(p-1)$ for positive integers $k$ and $\phi(1)=1$, we have $\phi(1)+\phi(p)+\cdots+\phi\left(p^{k}\right)=1+(p-1)+\left(p^{2}-p\right)+\cdots+\left(p^{k}-p^{k-1}\right)=p^{k}$, as desired.


problem:
Show that for positive integers $n$,

$$
\sum_{d \mid n} \frac{\mu(d)}{d}=\frac{\phi(n)}{n}
$$

solution:
On the grounds of the previous problem, Möbius inversion with $f(k)=\phi(k)$ and $g(k)=k$ gives:

$$
\phi(n)=f(n)=\sum_{d \mid n} g(d) \mu\left(\frac{n}{d}\right)=\sum_{d^{\prime} \mid n} g\left(\frac{n}{d^{\prime}}\right) \mu\left(d^{\prime}\right)=\sum_{d^{\prime} \mid n} \frac{n}{d^{\prime}} \mu\left(d^{\prime}\right)
$$

Alternatively, one uses the convolution of the functions $f(k)=n$ and $g(k)=\frac{\mu(d)}{d}$. The strategy is the same as the previous convolution proof. For $n=p^{k}$ with $k$ a positive integer, we have $\phi(n)=p^{k}-p^{k-1}$, while the series reduces to $p^{k} \cdot \mu(1)+p^{k} \cdot \mu(p) / p=p^{k}-p^{k-1}$.


problem:
Determine with proof, a simple closed form expression for

$$
\sum_{d \mid n} \phi(d) \tau\left(\frac{n}{d}\right)
$$

solution:
We claim the series reduces to $\sigma(n)$. The series counts the ordered triples $(d, x, y)$ with $d|n ; x| d ; 0<y \leq n / d ;$ and $(y, n / d)=1$. To see this, write

$$
\sum_{d \mid n} \phi(d) \tau\left(\frac{n}{d}\right)=\sum_{d^{\prime} \mid n} \phi\left(\frac{n}{d^{\prime}}\right) \tau\left(d^{\prime}\right)
$$

so that for a given $d^{\prime} \mid n$ we may choose $x$ and $y$ as described above. On the other hand, we can count these triples by groups sharing a given $x$. Fixing $x$ as a divisor of $n$ fixes an integer $\frac{n}{x}$. Then $d$ varies such that $\frac{n}{d}$ is a divisor of $\frac{n}{x}$. For each divisor $\frac{n}{d}$ of $\frac{n}{x}$ there are precisely $\phi\left(\frac{n}{d}\right)$ choices $y$, so that by the lemma from the previous problem, there are $\frac{n}{x}$ triples $(d, x, y)$ for a given $x$. It follows that there are precisely $\sigma(n)$ such triples $(d, x, y)$.
Again, an alternative is to use the multiplicativity of the convolution, although it is now a little more difficult. Write $n=p^{k}$ so that

$$
\begin{aligned}
\sum_{d \mid n} & \phi(d) \tau\left(\frac{n}{d}\right)=\sum_{m=0}^{k} \phi\left(p^{m}\right) \tau\left(p^{k-m}\right)=k+1+\sum_{m=1}^{k} p^{m-1}(p-1)(k-m+1) \\
& =k+1+\left(\sum_{m=1}^{k} p^{m}(k-m+1)\right)-\left(\sum_{m=1}^{k} p^{m-1}(k-m+1)\right)=k+1+p^{k}-k+\sum_{m^{\prime}=1}^{k-1} p^{m^{\prime}} \\
& =1+p+\cdots+p^{k}=\sigma\left(p^{k}\right)
\end{aligned}
$$


problem:
Find all positive integers $n$ such that

$$
\sum_{k=1}^{n} \phi(k)=\frac{3 n^{2}+5}{8}
$$

solution: 1, 3,5.


solution:
We contend that the proper relation is

$$
\sum_{k=1}^{n} \phi(k) \leq \frac{3 n^{2}+5}{8}
$$

Let $\Phi(k)$ denote the left hand side of $(*)$. It is trivial to see that for $n \leq 7$ the posed inequality holds, has equality where $n=1,3,5$, and holds strictly for $n=7$. Note that $\phi(2 k) \leq k$ and $\phi(2 k+1) \leq 2 k$, the former because $2,4, \ldots, 2 k$ share a common divisor. It follows that $\phi(2 k)+\phi(2 k+1) \leq 3 k$. Suppose for the sake of induction that $\Phi(2 k-1)<\frac{3(2 k-1)^{2}+5}{8}$. Then

$$
\Phi(2 k+1)=\Phi(2 k-1)+\phi(2 k)+\phi(2 k+1)<\frac{3(2 k-1)^{2}+5}{8}+3 k=\frac{3(2 k+1)^{2}+5}{8}
$$

To complete the proof, it is enough to note that for a positive integer $k$,

$$
\frac{3(2 k-1)^{2}+5}{8}+k<\frac{3(2 k)^{2}+5}{8}
$$


problem:
Find all pairs $(n, k)$ of positive integers such that

$$
\sigma(n) \phi(n)=\frac{n^{2}}{k}
$$

solution: (1, 1).


solution:
It is clear that for a given integer $n$, there is at most one integer $k$ for which the equation holds. For $n=1$ this is $k=1$. But, for $n>1$, problem 1 asserts that $\sigma(n) \phi(n) \leq n^{2}-1<n^{2}$, so that $k \geq 2$. We now claim that $2>\frac{n^{2}}{\sigma(n) \phi(n)}$. Write $n=p_{1}^{e_{1}} \cdots p_{k}^{e_{k}}$, where the $p_{i}$ are distinct primes and $e_{i} \geq 1$ for all $i$, and let $q_{1}<q_{2}<\cdots$ be the primes in ascending order. Then

$$
\begin{aligned}
& \frac{n^{2}}{\sigma(n) \phi(n)}=\prod_{i=1}^{k} \frac{p_{i}^{2 e_{i}}}{\frac{p_{i}^{e_{i}+1}-1}{p_{i}-1} \cdot\left(p_{i}-1\right) p_{i}^{e_{i}-1}}=\prod_{i=1}^{k} \frac{p_{i}^{2 e_{i}}}{p_{i}^{2 e_{i}}-p_{i}^{e_{i}-1}} \\
& \quad=\prod_{i=1}^{k} \frac{1}{1-p_{i}^{-1-e_{i}}} \leq \prod_{i=1}^{k} \frac{1}{1-p_{i}^{-2}}<\prod_{i=1}^{\infty} \frac{1}{1-q_{i}^{-2}} \\
& \quad=\prod_{i=1}^{\infty}\left(\sum_{j=0}^{\infty} \frac{1}{q_{i}^{2 j}}\right)=\sum_{n=1}^{\infty} \frac{1}{n^{2}} \\
& \quad<1+\sum_{n=2}^{\infty} \frac{1}{n^{2}-1}=1+\frac{1}{2}\left(\left(\frac{1}{1}-\frac{1}{3}\right)+\left(\frac{1}{2}-\frac{1}{4}\right)+\left(\frac{1}{3}-\frac{1}{5}\right)+\cdots\right)=\frac{7}{4}<2 .
\end{aligned}
$$

It follows that there can be no solutions to $k=\frac{n^{2}}{\sigma(n) \phi(n)}$ other than $n=k=1$.

## Grab Bag - Miscellaneous Problems [130]


problem:
Find all functions $f: \mathbb{Q} \rightarrow \mathbb{Q}$ such that

$$
\begin{aligned}
f(x) f(y) & =f(x)+f(y)-f(x y) \\
1+f(x+y) & =f(x y)+f(x) f(y)
\end{aligned}
$$

for all rational numbers $x, y$.

solution: $\mathbf{f}(\mathbf{x})=\mathbf{1} \forall \mathbf{x}$, and $\mathbf{f}(\mathbf{x})=\mathbf{1}-\mathbf{x} \forall \mathbf{x}$.


solution:
Considering the first equation, either side of the second equation is equal to $f(x)+f(y)$. Now write $g(x)=1-f(x)$, so that

$$
\begin{aligned}
& g(x y)=1-f(x y)=1-f(x)-f(y)+f(x) f(y)=(1-f(x))(1-f(y))=g(x) g(y) \\
& g(x+y)=1-f(x+y)=1-f(x)+1-f(y)=g(x)+g(y)
\end{aligned}
$$

By induction, $g(n x)=n g(x)$ for all integers $n$, so that $g(p / q)=(p / q) g(1)$ for integers $p$ and $q$ with $q$ nonzero; i.e., $g(x)=x g(1)$. As $g$ is multiplicative, $g(1)=g(1)^{2}$, so the only possibilities are $g(1)=1$ and $g(1)=0$. These give $g(x)=x$ and $g(x)=0$, or $f(x)=1-x$ and $f(x)=1$, respectively. One easily checks that these functions are satisfactory.


problem:
Let $A B C D$ be a cyclic quadrilateral, and let $P$ be the intersection of its two diagonals. Points $R, S, T$, and $U$ are feet of the perpendiculars from $P$ to sides $A B, B C, C D$, and $A D$, respectively. Show that quadrilateral $R S T U$ is bicentric if and only if $A C \perp B D$. (Note that a quadrilateral is called inscriptible if it has an incircle; a quadrilateral is called bicentric if it is both cyclic and inscriptible.)
![](https://cdn.mathpix.com/cropped/2025_01_24_c8f44577b1f0106491c6g-5.jpg?height=540&width=549&top_left_y=1253&top_left_x=837)

solution:
First we show that $R S T U$ is always inscriptible. Note that in addition to $A B C D$, we have cyclic quadrilaterals $A R P U$ and $B S P R$. Thus,

$$
\angle P R U=\angle P A U=\angle C A D=\angle C B D=\angle S B P=\angle S R P
$$

and it follows that $P$ lies on the bisector of $\angle S R U$. Analogously, $P$ lies on the bisectors of $\angle T S R$ and $\angle U T S$, so is equidistant from lines $U R, R S, S T$, and $T U$, and $R S T U$ is inscriptible having incenter $P$. Now we show that $R S T U$ is cyclic if and only if the diagonals of $A B C D$ are orthogonal. We have

$$
\begin{aligned}
& \angle A P B=\pi-\angle B A P-\angle P B A=\pi-\angle R A P-\angle P B R=\pi-\angle R U P-\angle P S R \\
& \quad=\pi-\frac{1}{2}(\angle R U T+\angle T S R)
\end{aligned}
$$

It follows that $\angle A P B=\frac{\pi}{2}$ if and only if $\angle R U T+\angle T S R=\pi$, as desired.


problem: Find all nonconstant polynomials $P(x)$, with real coefficients and having only real zeros, such that $P(x+1) P\left(x^{2}-x+1\right)=P\left(x^{3}+1\right)$ for all real numbers $x$.

solution: $\left\{\mathbf{P}(\mathbf{x})=\mathbf{x}^{\mathbf{k}} \mid \mathbf{k} \in \mathbb{Z}^{+}\right\}$.


solution:
Note that if $P(\alpha)=0$, then by setting $x=\alpha-1$ in the given equation, we find $0=P\left(x^{3}+\right.$ $1)=P\left(\alpha^{3}-3 \alpha^{2}+3 \alpha\right)$. Because $P$ is nonconstant, it has at least one zero. Because $P$ has finite degree, there exist minimal and maximal roots of $P$. Writing $\alpha^{3}-3 \alpha^{2}+3 \alpha \geq \alpha \Longleftrightarrow \alpha(\alpha-1)(\alpha-2) \geq 0$, we see that the largest zero of $P$ cannot exceed 2 . Likewise, the smallest zero cannot be negative, so all of the zeroes of $P$ lie in [0,2]. Moreover, if $\alpha \notin\{0,1,2\}$ is a zero of $P$, then $\alpha^{\prime}=\alpha^{3}-3 \alpha^{2}+3 \alpha$ is another zero of $P$ that lies strictly between $\alpha$ and 1. Because $P$ has only finitely many zeroes, all of its zeroes must lie in $\{0,1,2\}$. Now write $P(x)=k x^{p}(x-1)^{q}(x-2)^{r}$ for nonnegative integers $p, q$ and $r$ having a positive sum. The given equation becomes

$$
\begin{aligned}
& k^{2}(x+1)^{p} x^{q}(x-1)^{r}\left(x^{2}-x+1\right)^{p}\left(x^{2}-x\right)^{q}\left(x^{2}-x-1\right)^{r}=P(x+1) P\left(x^{2}-x+1\right) \\
& \quad=P\left(x^{3}+1\right)=k\left(x^{3}+1\right)^{p} x^{3 q}\left(x^{3}-1\right)^{r}
\end{aligned}
$$

For the leading coefficients to agree, we require $k=k^{2}$. Because the leading coefficient is nonzero, $P$ must be monic. In $(*), r$ must be zero lest $P\left(x^{3}+1\right)=0$ have complex roots. Then $q$ must be zero as well. For, if $q$ is positive, then $P\left(x^{2}-x+1\right)=0$ has 1 as a root while $P\left(x^{3}+1\right)$ does not. Finally, the remaining possibilities are $P(x)=x^{p}$ for $p$ an arbitrary positive integer. It is easily seen that these polynomials are satisfactory.


problem:
Find an explicit, closed form formula for

$$
\sum_{k=1}^{n} \frac{k \cdot(-1)^{k} \cdot\binom{n}{k}}{n+k+1}
$$

solution: $\frac{-\mathbf{1}}{\binom{2 \mathbf{1}+1}{\mathbf{n}}}$ or $-\frac{\mathbf{n}!(\mathbf{n}+\mathbf{1})!}{(\mathbf{2 n}+\mathbf{1})!}$ or obvious equivalent.


solution:
Consider the interpolation of the polynomial $P(x)=x \cdot n!$ at $x=0,1, \ldots, n$. We obtain the identity

$$
\begin{aligned}
P(x) & =x \cdot n!=\sum_{k=0}^{n} k \cdot n!\prod_{j \neq k} \frac{x-j}{k-j} \\
& =\sum_{k=0}^{n} k \cdot n!\cdot \frac{x(x-1) \cdots(x-k+1)(x-k-1) \cdots(x-n)}{k!(n-k)!(-1)^{n-k}} \\
& =\sum_{k=1}^{n} k \cdot(-1)^{n-k} \cdot\binom{n}{k} \cdot x(x-1) \cdots(x-k+1)(x-k-1) \cdots(x-n)
\end{aligned}
$$

This identity is valid for all complex numbers $x$, but, to extract a factor $\frac{1}{n+k+1}$ from the valid product of each summand, we set $x=-n-1$, so that
$-(n+1)!=\sum_{k=1}^{n} k(-1)^{n-k}\binom{n}{k}(-n-1) \cdots(-n-k)(-n-k-2) \cdots(-2 n-1)=\sum_{k=1}^{n} \frac{k(-1)^{k}\binom{n}{k}(2 n+1)!}{n!(n+k+1)}$.
Finally,

$$
\sum_{k=1}^{n} \frac{k \cdot(-1)^{k} \cdot\binom{n}{k}}{n+k+1}=\frac{-n!(n+1)!}{(2 n+1)!}=\frac{-1}{\binom{2 n+1}{n}} \cdot \square
$$