$2^5 \cdot a^b=2,5ab$

274 Views Asked by At

I came across this problem in an elementary number theory book, and I think I solved it. Well, the question is posed as

$2^5 \cdot 9^2 = 2,592$. Are there any other pairs $a,b \in \mathbb{Z}$ such that $2^5 \cdot a^b = 2,5ab$ is satisfied ($a,b$ are the tens and one representative, not a product)?

So at first I just set up a $9\times9$ grid and sieved the answer (which is "No") mainly by eliminating such obvious answers as $a\ne1,2$, and $a^b\le82$. Then I quickly realized that $2^5|25ab$, and there are only a select few integers where $32\cdot x=25ab$, for some integers $a,b,x$. For example $32 \cdot 81 = 2,592 = 2^5 \cdot 9^2$, but this does not work for $32 \cdot 80=2,560 \neq 2^5 \cdot 6^0$ and $32 \cdot 79 = 2,528 \neq 2^5 \cdot 2^8$

So i think that, no, this is not possible except where $a=9, b=2$.

Now that I think i solved it, is there an algorithm for doing this quickly or does it require this sort of analysis for all $a^b \cdot c^d=a,bcd$?

2

There are 2 best solutions below

4
On BEST ANSWER

Solution $(a,b,c,d) = (2,5,9,2)$ is unique.

As hhsaffar wrote in the comments, this is easily verifiable on a computer. Here is how you can do it in Python 3:

for a in range(0,10):
  for b in range(0,10):
    for c in range(0,10):
      for d in range(0,10):
        if 1000*a + 100*b + 10*c + d == a**b * c**d:
          print("a = ", a, "; b = ", b, "; c = ", c, "; d = ", d)

Output:

a =  2 ; b =  5 ; c =  9 ; d =  2

I initially intended to do few more examples in other languages, but they all boil down to this.

Edit

Since the OP stated that he doesn't have Python, and I myself do not use Maple, here is the JavaScript version which should work in any browser:

for (a = 0; a < 10; a++)
  for (b = 0; b < 10; b++)
    for (c = 0; c < 10; c++)
      for (d = 0; d < 10; d++)
        if (1000*a + 100*b + 10*c + d == Math.pow(a,b) * Math.pow(c,d))
          document.getElementById("result").innerHTML +=
            "a = " + a + "; b = " + b + "; c = " + c + "; d = " + d + "<br>";

This code requires <div id="result"></div> somewhere in the document. You can test it or change it here. Beware: it runs in your browser, and if you make an infinite loop or a to processor-intensive algorithm, your browser may stop responding or crash, thus losing you opened tabs and/or any unsaved work. I suggest running this in another browser (i.e., in Chrome if you usually use Firefox).

6
On

There is a 'simple' way of doing this. Notice that $2^5\cdot a^b=25ab$ are both integers. Therefore, since $a^b$ is an integer, so too must be $$ a^b=\frac{25ab}{2^5}=\frac{25ab}{32} $$ Now this can be done by hand very simply. We know that $2500<a^b<2600$. How many multiples of $32$ fit this inequality? This is simple to check by hand, the only possibilities are $32\cdot 79=2528$, $32\cdot 80=2560$, and $32\cdot 81=2592$. Now just factor the numbers: $$ 2528=2^5\cdot79^1\;\;,\;\;2560=2^9\cdot5^1\;\;,\;\;2592=2^5\cdot 3^4 $$ factoring out a $2^5$ yields the choices $79^1$, $5^1$, and $3^4$ for the value of $a^b$. Since $0\leq a \leq 9$, $79^1$ is eliminated. It is easy to check that $5^1$ cannot work for then $a=5$ and $b=1$ and the $2^5\cdot 5^1=160 \neq 2551$.

This leaves $a^b=3^4$. We can also write this $a^b=(3^2)^2=9^2$ or $a^b=81^1$. Since $a,b$ are integers with $0\leq a \leq 9$, either $a=3$ and $b=4$ or $a=9$ and $b=2$. We know the last to be true and the case of $a=3$ and $b=4$ is a simple matter to show doesn't work. This method does not require a computer or calculator and took only about $5$ minutes using simple pen and paper.