wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> medium >> Delete A Digit, Get Power Of 2?
(Message started by: K Sengupta on Jul 27th, 2007, 8:07am)

Title: Delete A Digit, Get Power Of 2?
Post by K Sengupta on Jul 27th, 2007, 8:07am
Analytically determine all possible integers of the form 2p, where p is a positive integer such that if the first digit in the decimal expansion of 2p is obviated, the resulting number is equal to 2q, where q is a positive integer < p.

Title: Re: Delete A Digit, Get Power Of 2?
Post by Barukh on Jul 27th, 2007, 11:03am
[hide]32, 64[/hide] since [hide]p-q = 4[/hide]?

Title: Re: Delete A Digit, Get Power Of 2?
Post by Eigenray on Jul 31st, 2007, 4:24am
We have 2p - d*10k = 2q, or

[hide]d*10k = 2q(2p-q-1)

Comparing odd parts gives x*5k = 2p-q-1, where x is either 1,3,5,7, or 9.

If x=1, 5, or 9, the LHS is 1 mod 4, while the RHS is 3 mod 4 unless p-q=1.  But this would give x*5k=1, and k=0, which is invalid.

If x=3, then 2p-q=1 mod 3 implies p-q=2r must be even, and then 3*5k = 22r-1 = (2r+1)(2r-1).  Since these two factors are odd and differ by 2, they are relatively prime, so they must be {1, 3*5k} or {3, 5k} in some order.  Checking the 4 possibilities shows that the only way this can happen with k>0 is r=2, giving k=1.  Since x=3 we have d=3 or d=6, and this gives the solutions 32 and 64.

If x=7, then 2p-q=1 mod 7 implies p-q=3r must be divisible by 3, and then

7*5k = 23r-1 = (y-1)(y2+y+1),

where y=2r.  Since 1*(y2+y+1) - (y+2)*(y-1) = 3, and neither y-1 nor y2+y+1 can be divisible by 3, it follows these factors are relatively prime, so one of them is either 1 or 7, and checking the 4 possibilities shows no solutions with k>0.[/hide]

So the only solutions are [hide]32 and 64[/hide].

(Actually, this is a different proof than the one I used [link=http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_medium;action=display;num=1137992529]before[/link].)



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board