1
$\begingroup$

This question "Finding all natural $n$ such that $n^5+79$ has all digits same" was closed for lack of context. The solution $n=2,n^5+79=111$ was given, and comments to that question suggest that $n=2$ is likely the only solution, but provide no proof.

I find the original question interesting in itself (that is my context), and I offer here a proof that $n=2$ is in fact the only solution.

The question can be framed as finding all $n$ such that $$n^5+79=d\frac{10^k-1}{9}; d \in \{1,2,3,4,5,6,7,8,9\}$$ In this formulation, it is apparent that $k>2$ as the only numbers of the form $d\frac{10^k-1}{9}$ that are greater than $79$ for $k \le 2$ are $88$ and $99$, and neither of them afford an integer solution for $n$. We can rearrange the equation to $9(n^5+79)+d=d\cdot 10^k$ (as suggested in a comment by Peter in the original post).

Relying on the fact that $n^{\frac{p-1}{2}} \equiv (-1,0,1) \bmod p$ for prime $p$, the fifth power in the equation can be analyzed $\bmod 11$ (see comments by Maik Pickl in the original post). $n^5+79 \equiv (1,2,3) \bmod 11$, so $$9m+d \equiv d(-1)^k \bmod 11$$ where $m \in \{1,2,3\}$. This tells us two things: First, $k$ must be odd because $m \ne 0$; and second, $d \in \{1,2,3\}$ as those are the only single digit solutions to the equation $9m+2d \equiv 0 \bmod 11$

Analysis modulo $4$ eliminates the possibility of $d=3$. Note that $n^5 \not \equiv 2 \bmod 4$, hence $9(n^5+79) \not \equiv 1 \bmod 4$. For $k>2,\ d\cdot 10^k \equiv 0 \bmod 4$. Together these require $d \not \equiv 3 \bmod 4$, so $d=3$ is not possible.

To summarize up to this point: we are asked to find $n$ such that $n^5+79$ is either a string of an odd number of $1$s or a string of an odd number of $2$s. This in turn requires that the final digit of $n^5$, and hence $n$ (because $n^5 \equiv n \bmod 10$), is either $2$ or $3$, so that after adding $79$ the final digit of the string can be either $1$ or $2$. I attack this by setting $n=10b+a, a \in \{2,3\}$ and examining $n^5$ as a binomial expansion.

Case 1: $a=2$. $$n^5+79=(10b+2)^5+79=10^5b^5+5\cdot 2\cdot 10^4b^4+10\cdot 2^2\cdot 10^3b^3+10\cdot 2^3\cdot 10^2b^2+5\cdot 2^4 \cdot 10b+(2^5+79) =\dots \bar 11111$$ Analyzing this equation $\bmod 10^3$, we obtain $800b+111\equiv 111 \bmod 10^3$ which has the solution $b \equiv 0 \bmod 5 \Rightarrow b=10c \text{ or } b=10c+5$ Thus, $n=100c+2$ or $n=100c+52$. This leads to either of $$n^5+79=10^{10}c^5+5\cdot 2\cdot 10^8c^4+10\cdot 2^2\cdot 10^6c^3+10\cdot 2^3 \cdot 10^4c^2+5\cdot 2^4 \cdot 10^2c+2^5+79=\dots \bar 11111$$ or $$n^5+79= 10^{10}c^5+5\cdot 52\cdot 10^8c^4+10\cdot 52^2\cdot 10^6c^3+10\cdot 52^3 \cdot 10^4c^2+5\cdot 52^4 \cdot 10^2c+52^5+79=\dots \bar 11111$$ Regarding the first equation, analysis $\bmod 10^4$ yields $$8000c+111 \equiv 1111 \bmod 10^4 \Rightarrow 8000c \equiv 1000 \bmod 10^4$$ There is no value $c$ that can satisfy this equation.

Regarding the second equation, $52^4=7311616$ and $52^5=380204032$, so $5\cdot 52^4\cdot 10^2=3655808000$ and $52^5+79=380204111$. Analyzing the equation $\bmod 10^4$, we obtain $$8000c+4111 \equiv 1111 \bmod 10^4 \Rightarrow 8000c+3000 \equiv 0 \bmod 10^4$$ There is also no value $c$ that can satisfy this equation.

Thus there are no multidigit numbers $n$ of the form $10b+2$ that satisfy the equation.

Case 2: $a=3$. $$n^5+79=(10b+3)^5+79=10^5b^5+5\cdot 3\cdot 10^4b^4+ 10\cdot 3^2 \cdot 10^3b^3+10 \cdot 3^3\cdot 10^2b^2+5\cdot 3^4 \cdot 10 b+3^5+79=\dots \bar 22222$$ Analyzing this equation $\bmod 10^2$, we obtain $$50b+22 \equiv 22 \bmod 10^2 \Rightarrow 50b \equiv 0 \bmod 10^2$$ which has the solution $$b \equiv 0 \bmod 10 \text{ or } b \equiv 2 \bmod 10 \Rightarrow b=10c \text{ or } b=10c+2$$ Thus $n=100c+3$ or $n=100c+23$. This leads to either of $$n^5+79=(100c+3)^5+79=10^{10}c^5+5\cdot 3\cdot 10^8c^4+ 10\cdot 3^2 \cdot 10^6c^3+10 \cdot 3^3\cdot 10^4c^2+5\cdot 3^4\cdot 100c+3^5+79=\dots \bar 22222$$ or $$n^5+79=(100c+23)^5+79=10^{10}c^5+5\cdot 23\cdot 10^8c^4+ 10\cdot 23^2 \cdot 10^6c^3+10 \cdot 23^3\cdot 10^4c^2+5\cdot 23^4 \cdot 100c+23^5+79=\dots \bar 22222$$ Regarding the first equation, analysis $\bmod 10^4$ yields $$500c+322 \equiv 2222 \bmod 10^4 \Rightarrow 500c \equiv 1900 \bmod 10^4$$ There is no value $c$ that can satisfy this equation.

Regarding the second equation, $5\cdot 23^4 \cdot 100=139920500$ and $23^5=6436343$, so $23^5+79=6436422$. Analysis $\bmod 10^4$ yields $$500c+6422 \equiv 2222 \bmod 10^4 \Rightarrow 500c-4200 \equiv 0 \bmod 10^4$$ Here also, there is no value $c$ that can satisfy this equation.

Thus there are no numbers $n$ of the form $10b+3$ that satisfy the equation.

The question in the original post is proved to have no solution other than $n=2$

Since my agility with modular arithmetic, especially as it pertains to digits in various places in base $10$ numbers is not highly practiced, My questions are: Is my proof correct? And, can it be tightened up?

$\endgroup$
5
  • $\begingroup$ Closed questions might later be deleted, and comments are not meant to be permanent, so referring to comments on a closed question is not advised. $\endgroup$ Oct 28, 2021 at 1:53
  • 1
    $\begingroup$ @Thomas Andrews Since a lot of the first steps were given in comments to the cited question, I did not want to seem to take credit for those insights that were first made by others. That being said, I appreciate your cautionary advice. $\endgroup$ Oct 28, 2021 at 2:21
  • 2
    $\begingroup$ You can still give credit while including the arguments. $\endgroup$ Oct 28, 2021 at 2:35
  • $\begingroup$ (1) In Case 1, I've not found any errors. In Case 2, I think that there is an error in the step from $50b \equiv 0 \pmod{10^2}$ to $b \equiv 0,2\pmod{10}$. It follows from $50b \equiv 0 \pmod{10^2}$ that there is an integer $k$ such that $50b=100k$, i.e. $b=2k$. (2) Continuing your approach, I got that $n$ has to be of the form $n=2\times 10^8c+157880383$, but I stopped here. For example, $357880383^5+79$ ends with ten $2$s. $\endgroup$
    – mathlove
    Oct 28, 2021 at 16:23
  • $\begingroup$ @mathlove 1. Thanks for finding an error in my reasoning. 2. Since you provide an empirical example ending in ten $2$s, it is not likely that my line of argumentation will resolve the issue, even after I correct the error you found. I will have to go back to the drawing board. $\endgroup$ Oct 28, 2021 at 19:02

1 Answer 1

2
$\begingroup$

As pointed out by mathlove, your argument is incorrect at step 2. It's entirely possible that some simple elementary argument suffices, or maybe one can us quintic reciprocity or something similar. If you allow a bigger hammer, one can argue as follows. Modulo $10^4$, one finds that, outside of $$ 2^5+79=111, $$ one necessarily has $d=2$. Writing $k=5j+\ell$, with $0 \leq \ell \leq 4$, the equation thus becomes $$ 2\cdot 10^\ell \left( 10^j \right)^5 - 9 n^5 = 713. $$ Solving these five quintic Thue equations (say, via Magma or Pari/GP) leads to the desired conclusion. Of course, one is hiding an awful lot of machinery here, from computations in the corresponding quintic fields, to bounds for linear forms in logarithms and lattice basis reduction. Again, there may be a very easy way to do this!

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .