$s(n^x)$ is not a perfect square for all $x$

144 Views Asked by At

Does there exist an $n$ such that $s(n^x)$ is not a perfect square for all positive integers $x$ where $s(m)$ denotes the sum of the digits of a positive integer $m$?

If $n = 5$, for example, then take $x = 8$ to get $5^8 = 390625$, which has digit sum $25 = 5^2$.

If $n = 6$, take $x = 2$ to get $6^2 = 36$, which has digit sum $9 = 3^2$.

If $n = 7$, take $x = 7$ to get $7^7 = 823543$, which has digit sum $25 = 5^2$.

For $n = 19$, take $x = 15$ to get $19^{15} = 15181127029874798299$, which has digit sum $100 = 10^2$.

How can we find such an $n$ or prove that none exists?

2

There are 2 best solutions below

5
On

Here is a very handwavy argument that none exists. There are $9 \cdot 10^{k-1}$ numbers with $k$ digits, of which $\sqrt{10^k}-\sqrt{10^{k-1}}=10^{\frac k2}-10^{\frac{k-1}2}=(\sqrt{10}-1)10^{\frac{k-1}2}$ are squares. We imagine that the numbers of interest are randomly squares or not, so a $k$ digit number has probability $\frac {\sqrt{10}-1}910^{-\frac{k-1}2}$ of being a square.

$n^m$ has $m \log_{10}n$ digits and the average digit is $4.5$, so the digit sum is about $4.5m\log_{10}n$, which has $\log_{10}(4.5m\log_{10}n)=\log_{10}m+c$ digits for a suitable $c$. The chance for the digit sum to be square is then $\frac{\sqrt{10}-1}9\cdot 10^{-\frac {\log_{10}m+c}2}=\frac{\sqrt{10}-1}9\cdot10^{-\frac c2}\cdot m^{-\frac 12}$. The sum of these as $m$ goes from $1$ to $\infty$ diverges, so we expect infinitely many cases where the sum of digits of $n^m$ is a square.

Of course, someone could find a number where there is a recurring pattern to make the sum of digits nonsquare. The squares $\bmod 9$ are $0,1,4,7$ so if there were a number that you could prove the digit sums of the powers were always something else we would have an answer. For example, the digit sums of $10^m$ are always $1$. In this cases $1$ is a square, so this is not a problem.

0
On

Not an answer, but the following table shows that there are no counterexamples upto $3\ 686\ 021$. It shows the numbers for which the necessary exponent is larger than for the previous numbers.

1   1
2   2
5   8
8   12
19   15
32   22
37   94
47   158
146   160
362   272
812   776
842   1090
7814   1622
64961   2390
65681   2752
258935   3432
545993   3442
1224485   4902
2107598   5016
3686021   6862

Since the digitsum grows relatively slowly , I expect (in accordance with Ross's heuristic argument) that the digitsum will eventually be a square for every $n$ , but a proof will probably be out of reach.