Ana and Bety play a game alternating turns. Initially, Ana chooses an odd possitive integer and composite $n$ such that $2^j<n<2^{j+1}$ with $2<j$. In her first turn Bety chooses an odd composite integer $n_1$ such that \[n_1\leq \frac{1^n+2^n+\dots+(n-1)^n}{2(n-1)^{n-1}}.\]Then, on her other turn, Ana chooses a prime number $p_1$ that divides $n_1$. If the prime that Ana chooses is $3$, $5$ or $7$, the Ana wins; otherwise Bety chooses an odd composite positive integer $n_2$ such that \[n_2\leq \frac{1^{p_1}+2^{p_1}+\dots+(p_1-1)^{p_1}}{2(p_1-1)^{p_1-1}}.\]After that, on her turn, Ana chooses a prime $p_2$ that divides $n_2,$, if $p_2$ is $3$, $5$, or $7$, Ana wins, otherwise the process repeats. Also, Ana wins if at any time Bety cannot choose an odd composite positive integer in the corresponding range. Bety wins if she manages to play at least $j-1$ turns. Find which of the two players has a winning strategy.
Problem
Source: Pan-American Girls' Mathematical Olympiad 2022, P6
Tags: number theory, PAGMO, prime numbers
31.10.2022 10:57
JuanDelPan wrote: Ana and Bety play a game alternating turns. Initially, Ana chooses an odd composite integer $n$ such that $2^j<n<2^{j+1}$ with $2<j,$ with $j$ being a positive integer. In her first turn Bety chooses an odd composite integer $n_1$ such that \[n_1\leq \frac{1^n+2^n+\dots+(n-1)^n}{2(n-1)^{n-1}}.\]Then, on her other turn, Ana chooses a prime number $p_1$ that divides $n_1$. If the prime that Ana chooses is $3$, $5$ or $7$, the Ana wins; otherwise Bety chooses an odd composite positive integer $n_2$ such that \[n_2\leq \frac{1^{p_1}+2^{p_1}+\dots+(p_1-1)^{p_1}}{2(p_1-1)^{p_1-1}}.\]After that, on her turn, Ana chooses a prime $p_2$ that divides $n_2,$, if $p_2$ is $3$, $5$, or $7$, Ana wins, otherwise the process repeats. Also, Ana wins if at any time Bety cannot choose an odd composite positive integer in the corresponding range. Bety wins if she manages to play at least $j-1$ turns. Find which of the two players has a winning strategy. Fixed typos and made it clearer.
31.10.2022 11:18
Let the function $\frac{1^{p_1}+2^{p_1}+\dots+(p_1-1)^{p_1}}{2(p_1-1)^{p_1-1}}.$ be called $f(p_1).$ Mainly, we will use the fact that $f(n)<cn.$ Let us see what happens if $c=2.$ With this, we must have that $n_{i+1}<2p_{i}.$ Since $n_{i+1}$ is an odd composite, $p_{i+1}<\frac{2}{3}p_{i}.$ However, this is not strong enough. We want a $\frac{1}{2}.$ Thus, we will prove $f(n)<1.5n,$ meaning every time $p_i$ will at least half. Want $\frac{1^{n}+2^{n}+\dots+(n-1)^{n}}{2(n-1)^{n-1}}<1.5n$ In fact, stricter we have $\frac{1^{n}+2^{n}+\dots+(n-1)^{n}}{3(n-1)^{n}}<1$ Now, by integration, we have an upper bound of $\frac{\frac{n^{n+1}}{n+1}}{3(n-1)^n}=\frac{n^{n+1}}{3(n+1)(n-1)^n}$ Now, note that $3(n+1)(n-1)^n>n^{n+1}$ is our goal. Note $n>8.$ This is equivalent to $3\left(1-\frac{1}{n^2}\right)\left(1-\frac{1}{n}\right)^{n-1}>1.$ Binomial expansion $3\left(1-\frac{1}{n^2}\right)\left(1-\frac{n-1}{n}+\frac{(n-1)(n-2)}{2n^2}-\frac{(n-1)(n-2)(n-3)}{6n^3}\right)=3\left(1-\frac{1}{n^2}\right)\left(\frac{2n^3+3n^2-5n-6}{6n^3}\right)$ Thus, we prove this is at least $1,$ or that $\left(1-\frac{1}{n^2}\right)\frac{2n^3+3n^2-5n-6}{2n^3}>1.$ In other words, we propose: $2n^5+3n^4-7n^3-9n^2+5n+6>2n^5.$ Now our goal is to prove $g(n)=3n^4-7n^3-9n^2+5n+6>0$ for $n>8.$ In fact, we $3n^2-7n-9>0$ for $n>8,$ so we must have $g(n)>0.$ Thus, we must have $c=1.5$ work.
19.07.2023 00:25
We will show that Ana can always win. Her strategy is to choose the smallest prime $p$ number that divides $n_k$. See that, with $n$ being composite, $p^2\mid n$ or $q\mid n$ for some prime $q>p$. In both cases, $n\geq p^2$. Moreover, for $n>2$, $k^n+(n-1-k)^n<(n-1)^k$ $\forall$ $1\leq k\leq n-2$, so $f(n)=\frac{1^n+2^n+\dots+(n-1)^n}{2(n-1)^{n-1}}<\frac{(\frac{n-2}{2}+1)(n-1)^n}{2(n-1)^{n-1}}=\frac{n(n-1)}{4}<\frac{n^2}{4}$. Finally, see that $n_1<\frac{n^2}{4}<2^{2j}$ and $n_{k+1}<\frac{p_k^2}{4}\leq \frac{n_k}{4}$. If Bety manages to play at least $j-2$ turns, we have $n_{j-2}<2^6$, but the smallest composite number without factors $2,3,5,7$ is $11^2>2^6$, so Ana can win in her next move. Motivation: $f(n)$ seems to be increasing. Ana's movement just restricts the size of the integer that Bety will choose next. So she must select the smallest prime that divides $n$. Knowing that, Bety must choose $n=p^2$ for the largest prime $p$ she can choose. So the problem resumes to estimate $f(n)$ to show if the sequence of primes can stay greater than $7$ after $j-2$ turns (the initial number is $\approx 2^j$, so we need some bound like $p_{k+1}>\text{ or }<\frac{p_k}{2}$). Intuitively, $f(n)$ is asymptotically linear, although I didn't find an elementary way to show the upper bound. But this leads to a bound like $p_{k+1}<\sqrt{Cp_k}$, which is much better than $p_{k+1}<\frac{p_k}{2}$. Then, Ana must win.