The Grey Labyrinth is a collection of puzzles, riddles, mind games, paradoxes and other intellectually challenging diversions. Related topics: puzzle games, logic puzzles, lateral thinking puzzles, philosophy, mind benders, brain teasers, word problems, conundrums, 3d puzzles, spatial reasoning, intelligence tests, mathematical diversions, paradoxes, physics problems, reasoning, math, science.

   
The Grey Labyrinth Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    RegisterRegister  
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Relationship Between Powers of Different Base Systems

 
Reply to topic    The Grey Labyrinth Forum Index -> Science, Art, and Culture
View previous topic :: View next topic  
Author Message
MTGAP
Daedalian Member



PostPosted: Sun Oct 12, 2008 11:19 pm    Post subject: 1 Reply with quote

I was thinking the other day, "What is the last digit of [url="http://everything2.com/e2node/Graham%2527s%2520Number"]Graham's number?[/url]" In base three, it would obviously be zero. But it's trickier in base ten. It turns out that 3^3^...^3^3 any number of times always ends in a seven.

I also noticed that each digit has a cycle. 3^0 = 1, 3^1 = 3, 3^2 = 9, 3^3 = 27, 3^4 = 81, 3^5 = 243, 3^6 = 729. The ones digit repeats. It goes 1, 3, 9, 7. You can see why. 1x3 is 3, 3x3 is 9, 9x3 ends in 7, and 7x3 ends in 1.

This type of pattern works for every place value. The tens place has a 40-digit cycle, the hundreds place has a 100-digit cycle, and the thousands place has a 500-digit cycle. I was unable to calculate any cycle above that. So what I'm wondering is, is there a predictable pattern to the increasing values of these cycles?

Here's a number that's simpler than three: 5. The ones digit is always 5, the tens is always 2. The hundreds cycles through 1 and 6. The thousands cycles through 3, 5, 8, and 0. The cycles get much longer after that. So what's the pattern?
_________________
This statement is false.
Back to top
View user's profile Send private message
ralphmerridew
Daedalian Member



PostPosted: Mon Oct 13, 2008 12:10 am    Post subject: 2 Reply with quote

First, the tens place has a 20-digit cycle. So for the special case of powers of 3, modulo 10^i, the cycle length is a simple GP.

More generally, define phi(n) as the number of numbers 1 <= i <= n such that gcf(i,n) = 1.

If p_1, p_2, ... p_j are distinct primes, and n = p_1^e_1 * p_2^e_2 * ... * p_j^e_j, then phi(n) can be calculated as

phi(n) = (p_1-1)*p_1^(e_1-1) * (p_2-1)*p_2^(e_2-1) * ... * (p_j-1)*p_j^(e_j-1) = n * (1-1/p_1) * (1-1/p_2) * ... * (1-1/p_j).

IIRC, the period of any base mod n will be a factor of phi(n)
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Display posts from previous: by   
Reply to topic    The Grey Labyrinth Forum Index -> Science, Art, and Culture All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Site Design by Wx3