# Finding roots of numbers quickly

## Computing cube roots of two digit numbers

In summer 2018, I was teaching a math class for high school students on problem solving and algebra at Harvard. A student of mine mentioned a trick he knew for calculating a cube root of a number quickly in his head. The entire class was interested, and he gave us the following instructions:

• Choose any two digit number you like and cube it on a calculator.
• Tell me the number you cubed.

I pulled out my phone, cubed a number, and told the student “my number cubed is 148,877”. In a split second, he responded back “the number you cubed was 53”. I was shocked that he solved it so quickly! For a few more minutes, other students called out cubes, and the student would respond back with what number was cubed. After amazing all of us, the student was kind enough to teach us his trick. In this blog post, I’ll show the same steps so that you too can pull off this trick to impress your friends/family.

To begin with, the only bits of information you need to be able to pull off this trick are knowing the 1-digit cubes in your head. If you don’t know them, they are:

$2^3=8, 3^3=27, 4^3=64, 5^3=125, 6^3=216, 7^3=343, 8^3=512, 9^3=729.$

One important thing to notice in this list is that the units digit of every cube is unique.

Since the units digit are unique, if we know what the units digit of $x^3$, we can look at our table above to determine the units digit of $x$. For example, if $x^3 =148,877$, then since $x^3$ has a units digit of $7$, we know the units digit of $x$ is $3$ by looking at the table above.

Now that we know the units digit of $x$, all that’s left to determine is the tens digit (since we started with a $2$ digit number). For this, we need to determine what two cubes the digits in the thousands place of $x^3$ lie between. For example, with $148,877$, the digits in the thousands place are $148$. We see that $125<148<216,$ therefore,

$50^3=125,000<148,8777<216,000=60^3.$

Hence, we know the tens digit of $x$ is $5$, so our original cube must be $53$.

Let’s try another quick example, and then I’ll leave some exercises for the reader.

Suppose we want to find the two digit number, which, when cubed gives us $373,248$. We begin by looking at the units digit of our cube, which is $8$. We therefore know the units digit of the two digit number must be $2$. Furthermore, we see that $343<373<512$, therefore, the tens digit of the cube must be $7$. Hence, our two digit number is

$72^3=373,248$.

### Practice Problems

Here are some exercises for the reader to try out themselves:

• Find the two digit number, such that its cube is equal to $19,683$.
• Find the two digit number, such that its cube is equal to $29,791$.
• Find the two digit number, such that its cube is equal to $74,088$.
• Find the two digit number, such that its cube is equal to $185,193$.
• Find the two digit number, such that its cube is equal to $328,509$.
• Find the two digit number, such that its cube is equal to $614,125$.
• Find the two digit number, such that its cube is equal to $970,299$.

## Computing 5th roots of numbers ending in 1, 3, 7, or 9 quickly

On Dr. Ali Gurel’s YouTube channel, COOL MATH, he shows a neat trick for finding fifth roots of odd numbers up to 200, not ending in a 5. I recommend watching his video first to see some examples of the trick, and below I’ll explain the math behind why the trick works and also extend it to any three digit number.

There are four cases for the units digit of the number: either a 1, 3, 7, or 9. Notice that

$1^5\equiv 1\pmod{10}, 3^5\equiv 3\pmod{10}, 7^5\equiv 7\pmod{10}, 9^5\equiv 9\pmod{10}$.

Therefore, the units digit of $x$ and $x^5$ are the same.

To use this trick on 5th roots of numbers between $1$ and $200$, you only need to memorize that $3^5=243$. For larger 5th roots, you’ll need to use a table to establish bounds.

### Units digit 1 case

In the case that the units digit is 1, then we can represent our number in the form $10x+1$. For now, we’ll tackle the same case as in Dr. Ali’s video and assume that $0\le x\le 19$.

Using the binomial theorem,

$(10x+1)^5=10^5x^5+\binom{5}{1}10^4x^4+\binom{5}{2}10^3x^3+\binom{5}{3}10^2x^2+\binom{5}{4}10x+\binom{5}{5}.$

Since $\binom{5}{3}=10$, we see every term is a multiple of $1000$, except for the last two. Therefore, when we consider the last three digits of $(10x+1)^5$, we get $(10x+1)^5\equiv 50x+1\pmod{1000}$. Since $0\le x\le 19$, we see that this remainder mod $1000$ is unique.

To find the original number, we take the last three digits and perform the calculation:

$\frac{\text{Last Three Digits}-1}{5}+1=\frac{50x+1-1}{5}+1=10x+1.$

For example, $21^5=4,084,101,$ which has the last three digits $101$. We therefore see that the fifth root of this number was $\frac{101-1}{5}+1=21.$

### Units digit 3 case

Now, if the number we started with ends in a $3$, then we can write the number in the form $10x+3$, where we assume for now that $0\le x\le 19$. Using the binomial theorem,

$(10x+3)^5=10^5x^5+\binom{5}{1}10^4x^4\cdot 3+\binom{5}{2}10^3x^3\cdot 3^2+\binom{5}{3}10^2x^2\cdot 3^3+\binom{5}{4}10^1x^1\cdot 3^4+3^5.$

Again, we only consider the last three digits of this number, and therefore

$(10x+3)^5\equiv 50x\cdot 3^4+3^5\pmod{1000}.$

Notice that $50\cdot 3^4=4050$, therefore we can further reduce to get

$(10x+3)^5\equiv 50x+3^5\pmod{1000}$.

Now if $0\le x\le 15$, then $50x+3^5<1000$, and we can use the same trick again:

$\frac{\text{Last Three Digits}-3^5}{5}+3=\frac{50x+3^5-3^5}{5}+3=10x+3.$

However, if $16\le x\le 19$, then the last three digits of our number will be $(50x+3^5-1000)$, so we have to add $1000$ to get our original number:

$\frac{\text{Last Three Digits}+1000-3^5}{5}+3.$

As an example of this, if we want to find the fifth root of $2,073,071,593$, since $593>3^5=243,$ we know it’s the first case and we get the fifth root as $\frac{593-3^5}{5}+3=73$.

Alternatively, if we want to find the fifth root of $205,236,901,143$, we see that $143<3^5$, therefore, we have the second case and get the fifth root as $\frac{143+1000-3^5}{5}+3=183$.

### Units digit 7 case

If our number ends in a $7$, then it can be represented as $10x-3$ where $0\le x\le 19$. By similar logic to the calculations before, we only consider the last three digits:

$(10x-3)^5\equiv \binom{5}{4}\cdot 10x\cdot (-3)^4+\binom{5}{5}\cdot (-3)^5\pmod{1000}.$

As before, since $\binom{5}{4}\cdot (-3)^4=4050$, this further reduces as

$(10x-3)^5\equiv 50x-3^5\pmod{1000}.$

Now if $19\ge x\ge 5$, the last three digits of $(10x-3)^5$ will be $50x-3^5$, so we perform the calculation

$\frac{\text{Last Three Digits}+3^5}{5}-3=\frac{(50x-3^5)+3^5}{5}-3=10x-3.$

As an example, if we wish to find the fifth root of $8,587,340,257$, we take the last three digits, $257$, and using the formula above get $\frac{257+3^5}{5}-3=97$, which is indeed the fifth root.

However, if $0\le x\le 4$, then $50x-3^5<0$, and therefore the last three digits will be $(50x-3^5+1000)$. In this case, we subtract $1000$ from our initial calculation to get:

$\frac{\text{Last Three Digits}-1000+3^5}{5}-3.$

As an example, if we want to find the fifth root of $69,343,957$, since $957+3^5>1000$, we use the calculation from the second case to get a fifth root of $\frac{957-1000+3^5}{5}-3=37.$

### Units digit 9 case

Finally, if a number ends in a $9$, then it can be represented in the form $10x-1$, where $0\le x\le 19$. By the same logic as before, we see that

$(10x-1)^5\equiv \binom{5}{4}\cdot 10x\cdot (-1)^4+\binom{5}{5}\cdot (-1)^5\pmod{1000}\equiv 50x-1\pmod{1000}.$

Therefore, to recover the original number, we can perform the following calculation:

$\frac{\text{Last Three Digits}+1}{5}-1=\frac{50x-1+1}{5}-1=10x-1$.

As an example, if we want to find the fifth root of $282,475,249$, we take the last three digits, $249$, and perform the calculation above to get a fifth root of $\frac{249+1}{5}-1=49$.

### Practice Problems

Here are some practice problems to test out your understanding of this method. I highly recommend reviewing the sections above as you work through these tricky examples! As a hint, pay attention tot he last three digits!

• Find the fifth root of $161,051$.
• Find the fifth root of $6,436,343$.
• Find the fifth root of $90,224,199$.
• Find the fifth root of $14,348,907$.
• Find the fifth root of $16,850,581,551$.
• Find the fifth root of $41,615,795,893$.

### Generalizing to larger numbers

This trick will work for all odd fifth powers ending in a $1,3,7,$ or $9$ up until $200^5=3.2 \cdot 10^{11}$. If we start with a number between $200$ and $400$, then the range for the fifth power is between $3.2\cdot 10^{11}$ and $1.024\cdot 10^{13}$. In this case, we can use the same trick as above, to get a number between $1$ and $200$, and then add $200$ to the final result.

For example, if someone tells us to find the fifth root of $3,973,195,810,651$, we see this number is approximately $3.9\cdot 10^{12}$, therefore the fifth root must be between $200$ and $400$. Using the same trick as before, we see that the number mod $200$ must be $\frac{651-1}{5}+1=131$, and adding $200$ to bring us into the correct range gives us $331$ (you can verify this is the fifth root of the original number using WolframAlpha).

In general, the fifth powers fall into the ranges given in the table below.

As a quick example, suppose you’re told to find the fifth root of $377,571,474,600,343$. Using the table above, you know this number is approximately $3.776\cdot 10^{14}$, which is in the bottom-most row, therefore the number which was cubed was between $800$ to $1000$. We look at the last three digits, $343$, and since the number ends in $3$, perform the calculation $\frac{343-3^5}{5}+3=23$ to determine the mod $200$ residue of our number. We then add $800$ to get our number into the desired range, and find the fifth root is $823$.

### Practice Problems with Larger Numbers

• Find the fifth root of $481,170,140,857$.
• Find the fifth root of $3,303,341,057,599$.
• Find the fifth root of $14,195,130,030,907$.
• Find the fifth root of $78,410,163,603,001$.
• Find the fifth root of $872,095,812,856,093$.

While these problems all look daunting at first, with some practice using the technique above, you should be able to compute the fifth roots in a matter of a few seconds! Give the method some practice and patience, and hopefully you too should be an expert on computing cube and fifth roots in your head quickly!