View Single Post
  #5  
Old 08-12-2007, 12:42 PM
Dale Dough Dale Dough is offline
Senior Member
 
Join Date: Aug 2005
Posts: 1,043
Default Re: Fun with Exponents

EDIT: If this post conveys too much confidence, I didn't mean it. It's merely my best guess. Answer at the bottom.

OK, this is a very very un-mathematical method.. I made an excel sheet with a function that multiplies five digits by 9, and then takes the modulus 100k, so it will always remain five digits.

Turns out this function has a period of 2500 iterations (is that the right terminology?). In other words, 9^2500 ends in 00001, as does 9^5k, 9^7500 etc. I verified this with Mathematica.

(The fact that I use this method to solve the problem probably means I don't deserve to have Mathematica, but that's another discussion [img]/images/graemlins/smile.gif[/img])

So, it's one of 2500 possibilities.

How big is 9^9^9^9.. with 2007 nines? I'm gonna assume that the formula is evaluated right to left, ie. 9^(9^(9^.. etc. Prolly standard for most, but again I'm a noobie.

We probably don't need to know. Since the last five digits repeat every 2500 iterations, all I need is 9^... with 2006 nines, mod 2500. Yay! Once we know which it is, we can take the last five digits of 9^(whatever that number).

It turns out that this function has a period of 250. So, our 2500 options are cut down to 250.

The period of 9^x mod 250 is 50.

(using the same Excel method)

Period of 9^x mod 50: 10

Period of 9^x mod 10: 2

Recap: We start with 100k options. We cut this down to 2500 possible combinations of the last five digits of 9^x.. 9^2500 mod 100k = 9^0 mod 100k = 1.

Because I barely understand this myself, and I assume somebody knows the answer, I won’t go into too much detail; I don’t expect anyone who didn’t understand before to understand it now.

The formula I get is:

9^( 9^( 9^( 9^( 9^( 9^(gazillion) mod 2) mod 10) mod 50) mod 250) mod 2500) mod 100k

Solving step by step: 9^gazillion mod 2 = 1, so we get:

9^( 9^( 9^( 9^( 9^(1) mod 10) mod 50) mod 250) mod 2500) mod 100k

Step 2: ( 9^(1) mod 10) = 9, so

9^( 9^( 9^( 9^9 mod 50) mod 250) mod 2500) mod 100k

Step 3: ( 9^9 mod 50) = 39

9^( 9^( 9^39 mod 250) mod 2500) mod 100k

Step 4: 9^39 mod 250 = 39

9^( 9^39 mod 2500) mod 100k

Step 5: 9^39 mod 2500 = 289

9^289 mod 100k = 45289

Cliff Notes: 45289. That’s my final answer.

I probably didn’t use the most elegant method to solve this problem; it probably can (and should) be done without long tables in Excel, and Mathematica. I’d be interested to hear a better method. Provided of course I didn’t get it wrong, period..
Reply With Quote