TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Solving the cube root of 19,683 mentally

134 点作者 nigamanth超过 2 年前

31 条评论

dmurray超过 2 年前
How to do this without relying on the fact that the number is a perfect cube:<p>Learn a handful of logs base 10 (not much more work than the cube digit laws). Maybe you know 2,3,5 and e.<p>19,683 is equal to 20,000<p>log 20,000 is log 2 + log 10 + log 10 + log 10 + log 10<p>That&#x27;s 0.30 + 1 + 1 + 1 + 1 which is 4.30<p>Divide by 3 (equivalent to taking cube root). That&#x27;s 1.43<p>Recall that log e is 0.43. So 1.43 is log (e * 10). Hopefully you remember e = 2.71, so the number you&#x27;re looking for is 27.1. If you remember that you rounded up to start, you can round back down and guess that it&#x27;s more like 27.0.<p>You can simplify this a little further by dividing out thousands and multiplying by 10s at the end, so you only need to find the cube root of 20 using the same process.
评论 #34653211 未加载
评论 #34654922 未加载
评论 #34655866 未加载
评论 #34662950 未加载
schoen超过 2 年前
I was surprised by the chart showing that there is a bijection between last digit of a number and last digit of the number&#x27;s cube.<p>In base 10, this works for every odd power but for no even power. (if you&#x27;re given that a square ends in anything but 0 or 5, there are always two different possibilities for the last digit of the square root)<p>Here are the powers (less than 100) for which this works in different bases (up to 25). Now I&#x27;m quite confused: what is the pattern here and what is the number-theoretic explanation for it?<p>(Edit: It looks like the bases for which <i>no</i> power, except the trivial case of 1, has this property are exactly those bases that are divisible by a perfect square -- but I wouldn&#x27;t have expected that and still don&#x27;t know how to account for it.)<p><pre><code> 2 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99] 3 [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99] 4 [1] 5 [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99] 6 [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99] 7 [1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97] 8 [1] 9 [1] 10 [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99] 11 [1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39, 41, 43, 47, 49, 51, 53, 57, 59, 61, 63, 67, 69, 71, 73, 77, 79, 81, 83, 87, 89, 91, 93, 97, 99] 12 [1] 13 [1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97] 14 [1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97] 15 [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99] 16 [1] 17 [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99] 18 [1] 19 [1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97] 20 [1] 21 [1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 55, 59, 61, 65, 67, 71, 73, 77, 79, 83, 85, 89, 91, 95, 97] 22 [1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39, 41, 43, 47, 49, 51, 53, 57, 59, 61, 63, 67, 69, 71, 73, 77, 79, 81, 83, 87, 89, 91, 93, 97, 99] 23 [1, 3, 5, 7, 9, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97] 24 [1] 25 [1]</code></pre>
评论 #34652909 未加载
评论 #34654434 未加载
detrites超过 2 年前
I guessed it first try from the post title, based on:<p>- it ends in 3, so the cube root must be a multiple of 3<p>- 30*3 is intuitively going to be 27,000, and 20*3 will be 8,000<p>- that leaves only 21, 24 and 27 to choose from, and given the exponential shape for 8k - 27k, I went with the largest<p>Not a &quot;solution&quot;, as I couldn&#x27;t be certain without confirming, but interesting how close a logical deduction could get.
评论 #34652737 未加载
评论 #34652682 未加载
评论 #34654046 未加载
评论 #34653025 未加载
评论 #34652794 未加载
chasing超过 2 年前
20 cubed is obviously too low. 30 cubed too high. 7 is the only number that, when cubed, ends in 3. 27 it is.
评论 #34657867 未加载
评论 #34655805 未加载
评论 #34657155 未加载
jameshart超过 2 年前
Another approach is to recognize that if you know a number is a perfect cube, and you can recognize any prime factors it contains, you can pull out the <i>cube</i> of those from the number.<p>Like, by inspection (sum of digits) this number has 3 as a factor. That means 3 has to also be a prime factor of its cube root which means 27 has to be a factor of the cube.<p>So we can divide out 27, leaving us with the smaller problem of finding 3(cbrt(729)), which you might recognize as being 3*9, or spot that you can repeat the trick to give you 9(cbrt(27))…<p>Or you might notice that if 19683 has to contain 27 as a factor, that doesn’t leave a lot of room for any other cubed prime factors to exist in the number, and do a trial multiplication to confirm that 27 just <i>is</i> the cube root.<p>Basically comes down to, if you have a comfortable relationship with how numbers relate to their factors, you can develop a number of instincts for how to recognize shapes within them.
bumbledraven超过 2 年前
We want to find 19683¹ᐟ³ mentally.<p>First, note that, since the digit sum of 19683 is a multiple of 9, 19683 itself is a multiple of 9. Second, since 19683 is odd, its cube root will be odd as well. Therefore, the cube root of 19683 will be an odd multiple of 3.<p>To find 19683¹ᐟ³, will take the base 10 log of 19683, divide by 3, and raise the result to the 10th power, approximating where convenient.<p>To this end, it will be helpful to have approximate values for lg 2 and lg 5. Since 10³ ≈ 1024 = 2¹⁰ = 10^(lg[2]·10), we have 3 ≈ lg[2]·10. Solving, we find that lg 2 ≈ 0.3. Next, since 10 = 2·5, we have lg[10] = 1 = lg[2·5] = lg 2 + lg 5, so lg 5 = 1 − lg 2 ≈ 0.7.<p>Using those approximations, we calculate:<p>lg[19683¹ᐟ³] ≈ lg[20000¹ᐟ³] = lg[2·10000]&#x2F;3 = (lg 2 + lg 10000)&#x2F;3 ≈ (0.3 + 4)&#x2F;3 ≈ 1.43.<p>Since 25 = 5·5, we have lg 25 = lg 5 + lg 5 ≈ 1.4. This means we&#x27;re looking for an odd multiple of 3 near 25. The closest number that fits the bill is 27. Cubing, we find that 27·27·27 = 19683, so we are done.
meling超过 2 年前
There is a typo in the second example:<p>2. Find the cube root of 653,503<p>It should be 658,503…
评论 #34652603 未加载
kazinator超过 2 年前
It should be close to cbrt(20000) = cbrt(20) cbrt(1000) = cbrt(20) * 10 = 2.x * 10 = 2x.<p>The job is to find x.<p>Assuming 19683 has an integer cube root, I would guess the last digit x to be 7, because that gives us the 3: 7 * 7 = 49, and 9 * 7 = 63.<p>Thus, the answer is probably 27. Cubing 27 mentally to validate the answer is the harder thing for me. :)
评论 #34654495 未加载
omnster超过 2 年前
Reminded me of the story about Feynman being challenged by an abacist to compute cubic root<p><a href="https:&#x2F;&#x2F;www.ecb.torontomu.ca&#x2F;~elf&#x2F;abacus&#x2F;feynman.html" rel="nofollow">https:&#x2F;&#x2F;www.ecb.torontomu.ca&#x2F;~elf&#x2F;abacus&#x2F;feynman.html</a>
croes超过 2 年前
&gt;Notice how, the cubes of 1, 4, 5, 6, and 9 always end with the number itself.<p>The cube of 3 ends with 7 and cube of 7 end with 3<p>The cube of 2 ends with 8 and cube of 8 end with 2<p>Cube-buddies
_Microft超过 2 年前
My method is certainly not as sophisticated as others here but since it was different from these others, I will post it as well.<p>The solution should obviously be somewhere between 20 and 30. Since I knew <i>25^2 = 625</i> already, I multiplied by 25 to arrive at <i>25^3 = 15625</i>.<p>From there I used the approximation <i>(1 + x)^n = 1 + nx</i> which works if <i>x &lt;&lt; 1</i>.<p><i>19683 = 15625*(1 + x) = 25^3*(1 + x)</i> with <i>x ~= 4000&#x2F;15625 ~= 0.25</i>. This stretches the condition (<i>&quot;x &lt;&lt; 1&quot;</i>) for the approximation a lot but so be it.<p><i>(1 + 1&#x2F;4)^1&#x2F;3 ~= 1 + 1&#x2F;12</i>.<p><i>25*(1 + 1&#x2F;12) ~= 27</i><p>Good enough ;)
kqr超过 2 年前
Slightly related musing: I can quickly approximate 1&#x2F;3 of any number. I suspect this is because that&#x27;s an operation I&#x27;ve had to use often.<p>If I had needed cube roots equally often, would I have been just as good at mentally intuition roughly what number it has to be?<p>Or are humans somehow wired to deal with linearities more intuitively than powers? Or is it our mathematical notation (Arabic numbers are linear, as opposed to some log scale) that creates that impression?
评论 #34653190 未加载
评论 #34654477 未加载
_steady超过 2 年前
Loads of chat about remembering logs etc, I was expecting to see more number theory here as it’s a really lovely and applicable part of maths.<p>(As far as doing the calc, I thought it has to end in 7 becaus3 it’s the only one with a cub3 residue of 3 mod 10, which is what they say in post. Then 20 and 30 cubed are 8000 and 27000 respectively and assuming we’re restricting to Z 27 is the only possible answer)
thrdbndndn超过 2 年前
<a href="https:&#x2F;&#x2F;math.stackexchange.com&#x2F;questions&#x2F;1142767&#x2F;why-does-this-cube-root-trick-work" rel="nofollow">https:&#x2F;&#x2F;math.stackexchange.com&#x2F;questions&#x2F;1142767&#x2F;why-does-th...</a><p>Also, I have an additional question.<p>Obviously this trick relies on the fact that &quot;the last digit of the cube of all numbers from 0 to 9 is distinct&quot;.<p>Is this fact just coincidence, or is it bound to happen?
评论 #34654125 未加载
评论 #34652977 未加载
评论 #34653785 未加载
sbaiddn超过 2 年前
For those of us who have tried but failed to memorize our logs (obviously the best method to ballpark it) :<p>For the n-the square root just group the digits by n starting from the ones. That will tell you how many digits you&#x27;re dealing with. Simplish math will give you the first digit off of the last grouping (simple since you only have to ^n the numbers from 1-10)<p>Simple counting and a bit of math and I have the order of mag and first digit.<p>2_<p>At this point I can either think of a decent trick to iterate the second digit (quick Taylor? [1]), or just guesstimate a linear fit and call it a 5.<p>25 is within 10%.<p>[1] instead of Taylor I would do Pascal&#x27;s triangle on the cube with the next term to calculate (30-x)^3 (I use 30 - x and not 20+x since I want x as small as possible and I know the answer is closer to 30 than 20.<p>Pascal&#x27;s triangle:<p>1<i>(30)^3 + 3</i>(30)^2<i>x + 3</i>30<i>x^2 + 1</i>x^3<p>Drop the higher two terms.<p>3^3 + 3<i>3^2</i>x = 19<p>19-27 = 27<i>x<p>X = 8&#x2F;27 = 1&#x2F;3 (- 1&#x2F;27)<p>30-3.3 = 26.66<p>I use the sign of the next term of pascal&#x27;s triangle to see if Ive under or over estimated<p>3</i>3*(-0.3)^2 -&gt; positive<p>So my x is too large<p>So my answer is an underestimate.<p>(Cube root of 19000) greater than but close to 26.6
knaik94超过 2 年前
I know this more of a party trick than a practical skill, but I found it&#x27;s tricks like this that gets students I tutor a little more interested in math. Knowing these tricks doesn&#x27;t make you better at math, but understanding the underlying principle of focusing on significant&#x2F;meaningful digits absolutely will.
评论 #34653471 未加载
timwaagh超过 2 年前
Interesting to try 140.something is what I&#x27;m guessing.<p>Edit: Ah wait cube root. That is the square root I just tried.<p>26.something is what my mental calculations gave me. I thought it was going to be 27. Turns out it is. I made an error somewhere which is why you gotta do this on paper.<p>As for method I kind of brie brute forced it. started with 100 cubed which is hundred thousand then 20 cubed which is 8000 then 30 cubed which is 3 cubed times 10 cubed which is 27k. 25 cubed which I don&#x27;t remember but was less then, then I knew it could not be 26 because the number is not even. I&#x27;d deal with fractions later. so I tried 27 cubed. 27 cubed is 3^3^3=27<i>3</i>3^5=81<i>3</i>3^4=243<i>3</i>3^3= 729<i>27=729</i>20+729<i>7 729</i>20=7290<i>2=14400+180=14580 729</i>7=4900+140+63=5103 Add them and 19683 comes out<p>Now try that in your head and it&#x27;s a good recipe for frying one&#x27;s brain.
评论 #34654417 未加载
评论 #34654066 未加载
adastra22超过 2 年前
Only works if you know the number is a cube root though. I doesn’t help you find the “nearest” cube root.
评论 #34652541 未加载
red_Seashell_32超过 2 年前
offtopic, but your website is hard to read on mobile - width of text makes up less than 33% of screen, and whitespace on sides is too wide :&#x2F;<p>(though unsure how many of your traffic primarly reads article on mobile, so it might not even be an impactful issue)
less_less超过 2 年前
If you know that the number is a perfect cube, you could also try Hensel&#x27;s lemma or CRT, or Euler, all of which are aaaaalmost doable in your head for 2 digits, but maybe not quite.<p>Suppose you are trying to find cbrt(x), and you know the answer is a 2-digit integer.<p>===============<p>Hensel: first you have to remove any powers of 5 and 2. You know the cube root is even if the number is even, and a multiple of 5 if the number is a multiple of 5 (ends in a 0 or 5). So factor those out first. It now ends in 1,3,7 or 9.<p>Find the cube root w of x mod 10, and t = 1&#x2F;3x mod 10, by trial and error. Eg, x=19683 ends in 3, so w ends in 7 (since 7^3 ends in 3); t = 1&#x2F;3x ends in 9 since 3<i>9</i>x ends in 1.<p>Calculate the tens digit of the error term e = x - w^3, which is always a multiple of 10. In this case it&#x27;s ...683 - 343 === 40, and apply the adjustment w ==&gt; w + wte. You only need to calculate the 10s digit of wte. In this case, it&#x27;s the 10&#x27;s digit of 7*9*40 = 63*40 is 20.<p>That&#x27;s all, the answer is 27.<p>===============<p>CRT: Find the answer mod 10 and mod 11. As before, the answer here mod 10 is 7.<p>For mod 11, you can reduce it to a 2-digit problem by applying %99 first, i.e. shifting each digit over by 2 until it&#x27;s a 10s or 1s digit, and adding. We have 19683 mod 11 = (1 + 96 + 83) mod 11 = 180 mod 11 = 81 mod 11 = 4.<p>Find the cube root mod 11 by exhaustion, or by memorization, or by taking the 7th power of the input (Fermat&#x27;s theorem). In this case, it&#x27;s 5, because 5^3 mod 11 = 125 mod 11 =(1+25) mod 11 = 4.<p>Solve using the CRT: if a number is y mod 10 and z mod 11, then it&#x27;s y + 10(y-z mod 11). In this case, it&#x27;s 7 + 10(7-5 mod 11) = 27.<p>================<p>Euler: the answer is always the same as the last 2 digits of x^7. Calculate eg x^2, x^3, x^6, x^7 with four multiplications. You only need the last two digits.<p>Probably this is the easiest approach by hand.<p>================<p>If you want to solve on a computer, then Hensel mod 2^n (continuing the pattern appropriately for more bits) is probably the fastest bet.
评论 #34655545 未加载
cdelsolar超过 2 年前
I got 27 in about 10 seconds by doing a quick binary search and noticing the number ended in 3 (so it’s gotta end in 7). It’s in between 20 (8000) and 30 (27000).
Zacharias030超过 2 年前
Followup question, how to estimate&#x2F;calculate compound interest in your head quickly?<p>(Any direction, solving for the rate, or for the time, or the principal needed)
评论 #34653465 未加载
评论 #34653739 未加载
Gravityloss超过 2 年前
My mental process: Well it&#x27;s less than 100 since 100^2 = 10,000 so that goes over.<p>It&#x27;s over 10 since 10^3=1000.<p>So this narrows it to more than 10 and less than 100.<p>log-wise 30 is about midway between 10 and 100. 900 x 30 is is 27000 so it&#x27;s less than 30.<p>20? 400 x 20 = 8000 so bigger than that.<p>Then it gets annoying to compute the cubes so close enough to say more than 20 and less than 30.
dsr_超过 2 年前
In my head: oh, look, a multiple of 7.<p>What&#x27;s 30 cubed? 27 and three zeros, so not far away.<p>What&#x27;s 27 cubed? Oh, that&#x27;s it.<p>One of the things that you should learn is that the problems that humans set for each other usually involve integers or well known numbers.
atemerev超过 2 年前
I learned this method at the age of 7, and was playing a math savant for a few weeks.
madcaptenor超过 2 年前
I just recognized that it’s 3^9, but that’s dumb luck on my part.
评论 #34654097 未加载
xchip超过 2 年前
Note that where the article says 653,503 it should be 658,503
graderjs超过 2 年前
Guessing: 1000 is 10*10*10 this is close to 20K, so we have 10, now we need cube of 20. Between 2 and 3, take 2.5 so 25? No... it&#x27;s 27.
_a_a_a_超过 2 年前
27, but I only got that because it was explicitly given that 19,683 was a cube.
Simon_O_Rourke超过 2 年前
Super neat!
bohadi超过 2 年前
My solution was similar, represent.<p><pre><code> First we observe x is between 20^3=8e3 and 30^3=27e3. Then note that the least significant (singles) digit of x^3 is solely determined by the singles digit of x [only holds in the integers]. Luckily we had cached that the pattern for cubes is 123456789 -&gt; 187456329 Finally x^3 = 19,683 ends in 3 therefore x = 27 we are done. </code></pre> ------<p><pre><code> It turns out there is a unique mapping for the first digit of x^n, following one of four patterns: n mod 4 = 1 123456789 -&gt; 123456789 n mod 4 = 2 -&gt; 149656941 n mod 4 = 3 -&gt; 187456329 n mod 4 = 0 -&gt; 161656161 </code></pre> So this trick would not always be as useful, where the mapping is not surjective for squares, fourth powers -- all the even powers. I imagine there is a nice visual geometric explanation why those mappings take their symmetric pattern.<p>You may ask yourself, is there also a rule for the larger place digits of x^3, x^n? Yes, we naturally observe that the 10s digit of x^n is similarly wholly determined by the 10s and 1s digits of x. So now we want n maps on [0,9]x[0,9] to [0,9].<p>The python snippet may help to explore this: where the row 3, 25th digit shows that when x ends in 25, x cubed has 10s digit 2<p><pre><code> &gt;&gt;&gt; print(*zip(range(50), [&#x27;&#x27;.join([str(x**i).zfill(2)[-2:-1] for x in range(100)]) for i in range(50)]), sep=&#x27;\n&#x27;) (0, &#x27;0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&#x27;) (1, &#x27;0000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999&#x27;) (2, &#x27;0000123468024692582604827272840628529642086432100000001234680246925826048272728406285296420864321000&#x27;) (3, &#x27;0002621412032947913506462278580963075571028082329405076719170824429630014127735304680250760785873799&#x27;) (4, &#x27;0018529096043612327208547274580272321634069092581000185290960436123272085472745802723216340690925810&#x27;) (5, &#x27;0034227064053927756900342270640539277569003422706405392775690034227064053927756900342270640539277569&#x27;) (6, &#x27;0062925444068032162802087278020826123086044452926000629254440680321628020872780208261230860444529260&#x27;) (7, &#x27;0028823456070107573304842270100167479397084062167405238739510206025238098927751506624298920345671179&#x27;) ... (19, &#x27;0086429478094787353708082276960769671755062002581405814799730442823032030327719102646212500125075319&#x27;) (20, &#x27;0070727070007072707000707270700070727070007072707000707270700070727070007072707000707270700070727070&#x27;) (21, &#x27;0050025000011167116102722272220333873383049442944405550755050616621666077727772708388238880999479949&#x27;) (22, &#x27;0000123468024692582604827272840628529642086432100000001234680246925826048272728406285296420864321000&#x27;) (23, &#x27;0002621412032947913506462278580963075571028082329405076719170824429630014127735304680250760785873799&#x27;) (24, &#x27;0018529096043612327208547274580272321634069092581000185290960436123272085472745802723216340690925810&#x27;) ... (35, &#x27;0060227434056527793900602274340565277939006022743405652779390060227434056527793900602274340565277939&#x27;) (36, &#x27;0032925054061432187802967276920878123416045052923000329250540614321878029672769208781234160450529230&#x27;) (37, &#x27;0076823046079307576304102274800137479107085462182405718735410298025268091527798506324296020359671329&#x27;) (38, &#x27;0048321482080252902406667276660420925208028412384000483214820802529024066672766604209252080284123840&#x27;) (39, &#x27;0086429478094787353708082276960769671755062002581405814799730442823032030327719102646212500125075319&#x27;) (40, &#x27;0070727070007072707000707270700070727070007072707000707270700070727070007072707000707270700070727070&#x27;) (41, &#x27;0050025000011167116102722272220333873383049442944405550755050616621666077727772708388238880999479949&#x27;) (42, &#x27;0000123468024692582604827272840628529642086432100000001234680246925826048272728406285296420864321000&#x27;) (43, &#x27;0002621412032947913506462278580963075571028082329405076719170824429630014127735304680250760785873799&#x27;) ... </code></pre> -----<p>Apologies for the wall of text but the output is included here to show the periodicity is 20 in the 10s digit for powers of n.<p><i>What do you think the periodicity in the 100s digit is?</i><p>Okay let&#x27;s use our cache to just lookup the least two digits of say, 41679296 ^ 35 (without doing any <i>real</i> compute):<p><pre><code> 1s digit 35 mod 4 = 3 187456329 index 6 -&gt; 6 10s digit (35, &#x27;0060227434056527793900602274340565277939006022743405652779390060227434056527793900602274340565277939&#x27;) index ------96 -&gt; 7 The last two digits of 41679296 ^ 35 = 497981393104388234083687472206165994017494365065741791800324926291638211001469403054062791593737655590988883756006534609416313532750908441977019034732014717649617778735038244085515193249673259731575280032440237649262981884959117005449913087392615145373869733708824576 are indeed 76, cool</code></pre>