# Factoring puzzle

I have an amazing puzzle that should be a little difficult even for you awesome puzzlers.

$(ab)^c = def × ghij$

where each letter stands for a number from 0 to 9 (inclusive). Each digit must be unique and may not be repeated.

• Don't underestimate the brains of this community... ;) – Mordechai Mar 20 '17 at 3:15
• Haha! Nice one Mordechai! I'm new so... – user35295 Mar 20 '17 at 3:54
• Can we safely assume that leading digits a,d,g are nonzero? (Yes I know not assuming this just creates more solution space to be explored.) – smci Mar 20 '17 at 10:42
• I don't think so. I think that this would just be like throwing darts in darkness at a target on the roof of the CN tower. – user35295 Mar 20 '17 at 13:47
• Allan, is this question one you made up or did you get it from somewhere else? If from somewhere else, please add proper attribution to the question. Thanks! – Gareth McCaughan Oct 21 '17 at 15:19

A more rigorous proof showing all possible answers.

First, note that the product of a 3 digit number and a 4 digit number is somewhere between $$102 \times 3,456 = 352,512$$ and $$987 \times 6,543 = 6,457,941$$.

Since $$98^2 \lt 352,512 \lt 98^3$$ and $$10^6 \lt 6,457,941 \lt 10^7$$, we can infer that $$3 \le c \le 6$$.

Also, we know that $$a,d,g \ne 0$$.

Lastly, we can see that $$b=0,1,5 \implies j=0,1,5$$ so $$b,j \ne \{0,1,5\}$$ as well.

Since we have only 4 values for $$c$$, lets start with $$c=6$$.

# $$c=6$$

The only numbers that fall in the right range are $$13$$ or lower since $$14^6 = 7,529,536 \gt 6,457,941$$, which was our maximum 3-digit by 4-digit product.

Since $$10$$ and $$11$$ are ruled out, we only need to check $$12$$ and $$13$$.

## $$13^6$$

This is the easiest one to rule out. Since $$13$$ is prime, the the 3-digit and 4-digit factors must be powers of $$13$$. However, $$13^2=169$$ and $$13^3=2197$$ are the only ones that fit - both of which contain a 1, ruling them out.

## $$12^6=2,985,984$$

To get a last digit of $$4$$, the only option that doesn't involve, $$1, 2, 6$$ is $$f,j \in \{3,8\}$$.

But the only factors of $$12$$ are $$2$$ and $$3$$. That means that both the 3 and 4 digit factors must also have only $$2$$ and $$3$$ as their factors. Any number with a $$2$$ as a factor must be even, so the number ending in $$3$$ must only contain $$3$$s. Turns out, the only 3 or 4 digit powers of $$3$$ ending in $$3$$ is $$3^5=243$$. But this contains a $$2$$, so it cannot be one of the factors.

# $$c=5$$

The valid range is $$13^5$$ to $$23^5$$. We've ruled out numbers ending in $$0,1,5$$, so this leaves $$\{13,14,16,17,18,19,23\}$$.

## $$13^5=371,298$$

Since $$13$$ is prime, the two numbers must be $$13^2=169$$ and $$13^3=2197$$. However, there are too many repeated digits.

## $$14^5$$

$$14$$ only has $$2$$ and $$7$$ as factors. The only 3 digit numbers containing these factors are;

• $$2^4 \times 7 = 112$$ - duplicate $$1$$s
• $$2^4 \times 7^2 = 784$$ - duplicate $$4$$
• $$2^5 \times 7 = 224$$ - duplicate $$2$$s
• $$2^3 \times 7^2 = 392$$ - good so far, but the remaining factors $$2^2 \times 7^3 = 1372$$ creates duplicate $$1,2, 3$$
• $$2^2 \times 7^2 = 196$$ - duplicate $$1$$
• $$2 \times 7^3 = 686$$ - duplicate $$6$$
• $$7^3 = 343$$ - duplicate $$3$$

## $$16^5$$

Since $$16$$ is a power of $$2$$, we have 20 factors to spread around. The only valid 3 digit numbers are:

• $$2^7=128$$
• $$2^8=256$$
• $$2^9=512$$

## $$17^5$$

Again, this is prime. $$17^2=289$$ works, but $$17^3=4913$$ introduces a duplicate $$1$$ and $$9$$.

## $$18^5$$

This consists of $$18^5=2^5 \times 3^{10}$$. The following are the valid factors:

• $$2^5 \times 3^2 = 288$$
• $$2^5 \times 3^3 = 864$$
• $$2^4 \times 3^2 = 144$$
• $$2^4 \times 3^3 = 432$$ - good so far, but $$2 \times 3^7 =4374$$
• $$2^3 \times 3^3 = 216$$
• $$2^3 \times 3^4 = 648$$
• $$2^2 \times 3^3 = 108$$
• $$2^2 \times 3^4 = 324$$ - good so far, but $$2^3 \times 3^6=5832$$
• $$2^2 \times 3^5 = 972$$ - good so far, but $$2^3 \times 3^5=1944$$
• $$2 \times 3^4 = 162$$
• $$2 \times 3^5 = 486$$
• $$3^5 = 243$$ - good so far, but $$2^5 \times 3^5=7776$$
• $$3^6 = 729$$ - good so far, but $$2^5 \times 3^4=2592$$

## $$19^5$$

A prime. $$19^2=361$$ has a duplicate $$1$$. Out.

## $$23^5$$

A prime again. $$23^2=529$$ has a duplicate $$2$$, so it is out.

# $$c=4$$

The range of numbers is $$25^4$$ to $$50^4$$. But trailing $$0,1,5$$ are out, as are primes because the only way to divide 4th power of primes is 1 and 3, which will not yield a 3 digit number. Also out are doubled numbers and obviously, all numbers containing a 4. Thus, we are left with $$\{26, 27, 28, 32, 36, 38, 39\}$$.

## $$26^4$$

Since $$26^4=13^4\times 2^4$$, we don't have that many options for 3 digit numbers, all of which create duplicates:

• $$13^2 = 169$$
• $$13^2 \times 2 = 338$$
• $$13^2 \times 2^2 = 676$$
• $$13 \times 2^3 = 104$$
• $$13 \times 2^4 = 208$$

## $$27^4$$

This is simply $$3^{12}$$. The only 3 digit number is $$3^5=243$$ which has a duplicate $$2$$ and $$4$$. $$3^6$$ is also a 3 digit number, but the remaining factor would be the same, not a 4 digit number like required.

## $$28^4$$

This is $$28^4=7^4 \times 2^8$$. Our 3 digit possibilities are:

• $$7^3 \times 2 = 686$$
• $$7^3 = 343$$
• $$7^2 \times 2^2 = 196$$ - good so far, but $$7^2 \times 2^6 = 3136$$
• $$7^2 \times 2^3 = 392$$
• $$7^2 \times 2^4 = 784$$
• $$7 \times 2^4 = 112$$
• $$7 \times 2^5 = 224$$
• $$7 \times 2^6 = 448$$
• $$7 \times 2^7 = 896$$
• $$2^7, 2^8$$ each contain a $$2$$

## $$32^4$$

$$32$$ is just a power of $$2$$. The only 3 digit powers of $$2$$ all contain a $$2$$.

## $$36^4$$

This one is a bit complicated because $$36^4=2^8 \times 3^8$$ yields lots of factors. Also, 3 digit numbers under 168 will result in a 5 digit number for the remaining factors.

• $$3^6 = 729$$ but $$3^2 \times 2^8 = 2304$$
• $$3^5 = 243$$
• $$3^5 \times 2 = 486$$
• $$3^5 \times 2^2 = 972$$ but $$3^3 \times 2^6 = 1728$$
• $$3^4 \times 2 = 162$$
• $$3^4 \times 2^2 = 324$$
• $$3^4 \times 2^3 = 648$$
• $$3^3 \times 2^2 = 108$$
• $$3^3 \times 2^3 = 216$$
• $$3^3 \times 2^4 = 432$$
• $$3^3 \times 2^5 = 864$$
• $$3^2 \times 2^4 = 144$$
• $$3^2 \times 2^5 = 288$$
• $$3^2 \times 2^6 = 576$$
• $$3 \times 2^6 = 192$$ but $$3^7 \times 2^2=8748$$
• $$3 \times 2^7 = 384$$
• $$3 \times 2^8 = 786$$
• $$2^7=128$$
• $$2^8=256$$

## $$38^4$$

Since $$38^4=19^4\times 2^4$$, there aren't that many combinations to check. 3 digit numbers under 209 will result in a 5 digit factor.

• $$19^2 \times 2 = 722$$
• $$19^2 = 361$$ - good so far, but $$19^2 \times 2^4=5776$$
• $$19 \times 2^3 = 152$$
• $$19 \times 2^4 = 304$$

## $$39^4$$

Since $$39^4 = 13^4 \times 3^4$$, again, we don't have many combinations.

• $$13^2 = 169$$
• $$13^2 \times 3 = 507$$ but $$13^2 \times 3^3 = 4563$$
• $$13 \times 3^2 = 117$$
• $$13 \times 3^3 = 351$$

# $$c=3$$

$$71$$ is the lowest number which when taken to the power of $$3$$ is within the valid range. But it is prime, so you cannot make a 3 digit and a 4 digit number using only 3 $$71$$s as factors.

In fact, this is true of all primes in this range. So, we can rule out $$73, 79, 83, 89, 97$$, as well as all numbers that contain a $$3$$ or double digits - $$93, 77, 88$$. We already eliminated $$0, 1$$ and $$5$$ as the last digit, so we are left with the following possibilities:

$$\{72, 74, 76, 78, 82, 84, 86, 87, 92, 94, 96, 98\}$$

## $$72^3$$

$$72^3 = 3^6 \times 2^9$$. Looking at $$c=2, 36^4$$ we can see many of the options are already ruled out because they have duplicate digits. Also, any 3 digit number higher than than 373 will result in a second three digit number. The result is we only need to check one result further.

• $$3^3 \times 2^2 = 108$$ but $$3^3 \times 2^7 = 3456$$

Very close, but a duplicate $$3$$ sets us back.

## $$74^3$$

$$74^3=37^3\times 2^3$$. Factors are minimal.

• $$37 \times 2^2 = 148$$
• $$37 \times 2^3 = 296$$ but $$37^2 = 1369$$

## $$76^3$$

$$76^3 = 19^3 \times 2^6$$

• $$19^2 \times 2 = 722$$
• $$19^2 = 361$$
• $$19 \times 2^3 = 152$$ but $$19^2 \times 2^3 = 2888$$
• $$19 \times 2^4 = 304$$

## $$78^3$$

$$78^3 = 2^3 \times 3^3 \times 13^3$$

• $$13^2 = 169$$ but $$13 \times 2^3 \times 3^3 = 2808$$
• $$13^2 \times 3 = 507$$
• $$13^2 \times 2 = 338$$
• $$13^2 \times 2^2 = 676$$
• $$13 \times 3^3 = 351$$
• $$13 \times 3^3 \times 2 = 702$$
• $$13 \times 3^2 = 117$$
• $$13 \times 3^2 \times 2 = 234$$
• $$13 \times 3^2 \times 2^2 = 468$$
• $$13 \times 3^2 \times 2^3 = 936$$
• $$13 \times 3 \times 2^2 = 156$$ but $$13^2 \times 3^2 \times 2 = 3042$$
• $$13 \times 2^3 = 108$$

## $$82^3$$

$$82^3 = 41^3 \times 2^3$$

• $$41 \times 2^2 = 164$$ but $$41^2 \times 2 = 3362$$
• $$41 \times 2^3 = 328$$

## $$84^3$$

$$84^3 = 2^6 \times 3^3 \times 7^3$$. Any 3 digit number greater than 592 will not result in a 4 digit number.

• $$7^3 = 343$$
• $$7^3 \times 2 = 686$$
• $$7^2 \times 3^2 = 441$$
• $$7^2 \times 3^2 \times 2 = 882$$
• $$7^2 \times 3 = 147$$
• $$7^2 \times 3 \times 2 = 294$$
• $$7^2 \times 3 \times 2^2 = 588$$
• $$7^2 \times 2^2 = 196$$ but $$7 \times 3^3 \times 2^4=3024$$
• $$7^2 \times 2^3 = 392$$
• $$7^2 \times 2^4 = 784$$
• $$7 \times 3^3 = 189$$
• $$7 \times 3^3 \times 2 = 378$$
• $$7 \times 3^3 \times 2^2 = 756$$
• $$7 \times 3^2 \times 2 = 126$$ but $$7^2 \times 3 \times 2^5=4704$$
• $$7 \times 3^2 \times 2^2 = 252$$
• $$7 \times 3^2 \times 2^3 = 504$$
• $$7 \times 3 \times 2^3 = 168$$
• $$7 \times 3 \times 2^4 = 336$$
• $$7 \times 2^4 = 112$$
• $$7 \times 2^5 = 224$$
• $$7 \times 2^6 = 448$$
• $$3^3 \times 2^2 = 108$$
• $$3^3 \times 2^3 = 216$$ but $$7^3 \times 2^3 = 2744$$
• $$3^3 \times 2^4 = 432$$
• $$3^3 \times 2^5 = 864$$
• $$3^2 \times 2^4 = 144$$
• $$3^2 \times 2^5 = 288$$
• $$3^2 \times 2^6 = 576$$ and $$7^3 \times 3 =1029$$
• $$3 \times 2^6 = 192$$ but $$7^3 \times 3^2 = 3087$$

As you can see, a solution has been found!!

$$84^3=576 \times 1029$$

## $$86^3$$

$$86^3 = 43^3 \times 2^3$$

• $$43 \times 2^2 = 172$$ but $$43^2 \times 2 = 3698$$
• $$43 \times 2^3 = 344$$

## $$87^3$$

$$87^3=29^3 \times 3^3$$

• $$29^2 = 841$$
• $$29 \times 3^2 = 261$$ but $$29^2 \times 3 = 2523$$
• $$29 \times 3^3 = 783$$

## $$92^3$$

$$92^3 = 23^3 \times 2^6$$

• $$23^2 = 529$$
• $$23 \times 2^3 = 184$$ but $$23^2 \times 2^3 = 4232$$
• $$23 \times 2^4 = 368$$
• $$23 \times 2^3 = 736$$

## $$94^3$$

$$94^3 = 47^3 \times 2^3$$

• $$47 \times 2^2 = 188$$ but $$43^2 \times 2 = 3698$$
• $$47 \times 2^3 = 376$$

## $$96^3$$

$$96^3 = 3^3 \times 2^15$$

• $$3^3 \times 2^2 = 108$$ but $$2^13=8192$$
• $$3^3 \times 2^3 = 216$$
• $$3^3 \times 2^4 = 432$$
• $$3^3 \times 2^2 = 864$$
• $$3^2 \times 2^4 = 144$$
• $$3^2 \times 2^5 = 288$$
• $$3^2 \times 2^6 = 576$$
• $$3 \times 2^6 = 192$$
• $$3 \times 2^7 = 384$$
• $$3 \times 2^6 = 768$$
• $$2^7=128$$ but $$3^3 \times 2^8=6912$$
• $$2^8=256$$
• $$2^9=512$$ but $$3^3 \times 2^6=1728$$

## $$98^3$$

$$98^3 = 7^6 \times 2^3$$

• $$7^3 = 343$$
• $$7^3 \times 2 = 686$$
• $$7^2 \times 2^2 = 196$$
• $$7^2 \times 2^3 = 392$$

# Solution

Therefore, there is a single solution.

$$84^3=576 \times 1029$$

This should work:

$84^3=576\times1029$

Method (if you could call it one):

Honestly I found it through trial and error. I knew the number had to be between $111\times1111=123321$ and $999\times9999=9989001$, so, starting with $98^3$ (the highest power of $98$ between $123321$ and $9989001$), I went down through the double digit numbers, looking at the factors of $(ab)^3$ using Wolfram Alpha and finding those that consisted of all distinct digits.

• Could you share a link please? – user35295 Mar 20 '17 at 3:55
• @AllanCao Edited in, I assume you meant a link to what I did on Wolfram Alpha. – DooplissForce Mar 20 '17 at 9:59
• Thanks so much! I tried a different method but it didn't work. – user35295 Mar 20 '17 at 13:42
• @AllanCao No worries :) – DooplissForce Mar 20 '17 at 15:11