7

This is a problem $4$ of the "Bulgaria International Mathematics Competition $2023$":

The $53$-digit number $37,984,318,966,591,152,105,649,545,470,741,788,308,402,068,827,142,719$ can be expressed as $n^{21}$, where $n$ is a positive integer. What is the value of $n$?

Since the unit digit of $n^{21}$ is $9$, I noticed that, the unit digit of $n$ must be $9$. Additionally, since $n^{21}$ is a $53$-digit number let's see what the number of digits is (for example) for $n=200$,$$200^{21}=2^{21}\times100^{21}=1024\times1024\times2\times10^{42}$$Hence $200^{21}$ has $49$ digits. Consequently, $n\ge 209$. I'm not sure how to continue from here.

Bill Dubuque
  • 282,220
User
  • 8,033
  • 1
    Are you allowed to use some sort of technology? I'd hate to do this by hand. On the other hand, with a scientific calculator it's easy to show that $309^{21}$ is too small and $329^{21}$ too large. – Robert Israel Jun 27 '24 at 01:38
  • $n=319$. You should link from what contest this problem is so we would know if the contest were over –  Jun 27 '24 at 01:40
  • 1
    @RobertIsrael I believe it is not allowed as it is a problem from Bulgaria International Mathematics Competition 2023 and calculators and electronic devices are not allowed. – User Jun 27 '24 at 01:40
  • 1
    Since $\gcd(n,10)=1$ and Carmichael $\lambda(100)=20, n^{21}\equiv n\bmod100$; also $n$ is a multiple of $11$ – J. W. Tanner Jun 27 '24 at 01:53
  • ...and there's only one multiple of $11$ between $200$ and $400$ ending with $\dots19$ – J. W. Tanner Jun 27 '24 at 01:59
  • @J.W.Tanner Your comment about using the Carmichael function is an excellent deduction. Note also that $n^{21}\equiv 1\pmod{9}$, so $n\neq 219$ since, otherwise, $n\equiv 3\pmod{9};\to;n^{21}\equiv 0\pmod{9}$. However, $319\equiv 1\pmod{9}$ does work. – John Omielan Jun 27 '24 at 02:04
  • In my comment above, it should be $319\equiv 4\pmod{9}$ does work, with this being because $319^{21}\equiv 4^{21}\equiv (4^3)^7\equiv 64^7\equiv 1^7\equiv 1\pmod{9}$. – John Omielan Jun 27 '24 at 02:11
  • 1
    Yes, @JohnOmielan, or $4^{21}\equiv(4^6)^34^3\equiv64\equiv1\pmod9$; actually $n^{21}\equiv1\pmod3$, so $n\ne219$; (actually $319\equiv4\pmod9$ does work) – J. W. Tanner Jun 27 '24 at 02:12
  • 2
    @J.W.T Easier to use $400$ vs $100$ which also has $\lambda(400)=20,,$ so $\bmod 400!:\ n\equiv n^{21}\equiv 719\equiv 319\ \ $ – Bill Dubuque Jun 27 '24 at 02:17
  • In base $10$, $\log N \approx 52.58$ and $52.58/21 \approx 2.504$. We have $\log 316.2 \approx 2.5$ since $\sqrt{10} \approx 3.162$, and $\log 320 \approx 1+5\log 2 \approx 2.505$, so $319$ looks like a good bet. :-) – Brian Tung Jun 27 '24 at 07:46

5 Answers5

7

Simple way to discover it: $ $ by here we can easily take the $\,\color{#c00}{21}$'th root of $\,n^{\color{#c00}{21}}\equiv a\pmod{\!m}\,$ when $\,\color{#c00}{21}\,$ is coprime to Carmichael $\,\lambda(m),\,$ e.g. if $\,\color{#0af}{\lambda (m) = 20},\,$ e.g. if $\,m=400,\,$ yielding

$$\left[n^{\bf\color{#c00}{21}}\equiv a\right]^{\!\color{#c00}{\bf\Large\frac{1}{21}_{\phantom{|_{|}}}}}\!\!\!\!\!\! \underset{\large n^{\color{#0af}{20}}\ \equiv\ 1}\Longrightarrow\, n\:\!\equiv\:\! a^{\color{#c00}{\bf\Large \frac{1}{21}}\!\bmod\color{#0af}{20}_{\phantom{|_{|_|}}}}\!\!\!\!\equiv a^{\large\color{#c00}{\bf 1}}\! \equiv\, \ldots{\bf \color{#fa0}{27}}19\:\!\equiv\:\! {\bf \color{#fa0}3}19\!\!\pmod{\!{\bf \color{#fa0}4}00}\qquad$$

Bill Dubuque
  • 282,220
6

Since $\gcd(n,10)=1$ and Carmichael $λ(100)=20,$ $n^{21}≡n\bmod100$,

so the last two digits of $n$ are also $19$.

Can you show that $200<n<400$? That means $n=219$ or $n=319$.

But $219$ is a multiple of $3$, and $n^{21}$ is not.

J. W. Tanner
  • 63,683
  • 4
  • 43
  • 88
  • 1
    I added an answer which explains how this is nothing but a special case of the general method of taking $k$'th roots $!\bmod m$ whenever $k$ is coprime to $,\phi(m),$ (or $,\lambda(m))\ \ $ – Bill Dubuque Jun 27 '24 at 02:48
  • Calculating that $53$ digit integer $!\bmod 3$ is too much work. Easier: from $,\ldots {\bf \color{#fa0}{27}}19,$ we need only compute $,{\bf \color{#fa0}{27}}\bmod 4,,$ and this method works generally - see my comments on my answer. $\ \ $ – Bill Dubuque Jun 27 '24 at 05:15
4

The number of digits on the right-hand side is $53$. So,

$$\lfloor \log_{10}n^{21}\rfloor+1=53\implies52\le21\log_{10}n<53\implies299.358\ldots\le n<334.048\ldots$$

It means $300\le n\le334$ since $n$ is a positive integer.

The last digit on the right-hand side is $9$, which is odd. The last digit of $n$ must be odd. The last digit can not be $1$ and $5$. It can not be even $3$ and $7$ since $21\equiv1\pmod4$. So, the last digit must be $9$. It means $n$ can be either $309$ or $319$ or $329$. But observing the first few digits of $n^{21}$, $309$ would be too small and $329$ would be too large (see the logarithmic scale). We can verify that the second-last digit $1$ occurs only in $(3\cdot10^2+19)^{21}$. Hence, $n=319$ is the correct value/solution. $\blacksquare$

Pustam Raut
  • 2,490
4

We have $10^{53}>n^{21}>3.7\times10^{52}$. Since $3.7^2>10$ we have $n^{21}>10^{52.5}=10^{105/2}$. So $n>10^{5/2}>300$. It is easy to check that $400^{21}>10^{54}$. So the first digit is $3$. As you say, the last digit must be $9$. So $n=300+10t-1$, where $1\le t\le10$. The last two digits of $n^{21}$ are the same as those of $(10t-1)^{21}$. By the binomial theorem, $$ (10t-1)^{21}=-1+21\cdot 10t-210\cdot100t^2+\ldots=10t-1+\text{a positive multiple of 100.} $$ Hence $t=2$ and $n=319$.

Will Orrick
  • 19,218
2

Pustam Raut reduced the problem by $\log_{10}$ analysis and observing that the last digit is $9$ to one of the cases: $n=309,319,329.$

Since $n^{21}\equiv19\pmod{100}$ and $\varphi(100)=(4-2)(25-5)=40$, we have $(n^{21})^2=n^{42}=n^{40}\cdot n^2\equiv n^2\equiv61\pmod{100}.$ But, only $n=319$'s square is $61$ modulo $100$.

Pustam Raut
  • 2,490
Bob Dobbs
  • 15,712