All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Maximum Power 2 Divide Evenly (Posted on 2008-10-19) Difficulty: 3 of 5
Determine the maximum value of a positive integer G, such that (20071024 -1) is evenly divisible by 2G.

Note: Try to solve this problem analytically, although computer program/ spreadsheet solutions are welcome.

See The Solution Submitted by K Sengupta    
Rating: 4.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 2

In order for 2007^1024 - 1 to be evenly divisible by 2^G, 2007^1024 must be congruent to 1 mod 2^G. So just do the power raising mod 2^G for various G's until you no longer get 1. For manual processing this could be done by squaring 10 times for each 2^G value, but using the computer, modular multiplication by 2007, 1024 times is no big deal:

DEFDBL A-Z
p = 1
FOR g = 1 TO 20
  p = p * 2
  v = 1
  FOR i = 1 TO 1024
    v = (v * 2007) MOD p
  NEXT
  PRINT USING "## ####### #######"; g; p; v
NEXT

The resulting table is:

 G     2^G  2007^1024 mod 2^G 
 -    ----  -----------------  
 1       2            1
 2       4            1
 3       8            1
 4      16            1
 5      32            1
 6      64            1
 7     128            1
 8     256            1
 9     512            1
10    1024            1
11    2048            1
12    4096            1
13    8192            1
14   16384         8193
15   32768         8193
16   65536         8193
17  131072         8193
18  262144         8193
19  524288       270337
20 1048576       794625

So 13 is the maximum allowable positive integer value of G.

And, of course, as 2007^1024-1 is not divisible by 2^14, it's not divisible by any larger value of 2^G.


  Posted by Charlie on 2008-10-19 14:36:08
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information