captaino (
captaino
) wrote,
@
2006
-
03
-
22
00:26:00
Puzzle o' the Day 10!
A semi-quickie for today:
Find a positive integer X ending in 7 such that seven times X is the integer that results from moving that terminal 7 to the front. For example, if 7 times 1237 were 7123, 1237 would be an answer.
(
Post a new comment
)
chrishartman
2006-03-23 12:27 am UTC
(
link
)
For any digit d, the repeating portion of the decimal exapansion of d/(10d-1) will always work. For 7 that's 1014492753623188405797. (Much proof omitted, but I will note that since 10d-1 is relatively prime to 10, this always repeats with no leading non-repeating stuff, and has at most 10d-2 digits.)
Incidentally, if you want multiple digits in place of 7, the extension looks like de / (100 de - 1) where de is a 2 digit number.
This was NOT a quickie, and you owe me 4 hours.
(
Reply to this
)(
Thread
)
captaino
2006-03-27 07:47 am UTC
(
link
)
Sorry; I did say *semi*-quickie :-). Anyway, your solution is, once again, an excellent one; I especially like the way you generalized the problem. I'd like to see the skeleton of your proof, if it's not too arduous to reproduce.
The basic problem can be solved fairly quickly with some number theory. To wit:
If X has k digits:
7X = (X-7)/10 + 7(10^(k-1))
=> 70X = (X-7) + 7(10^k)
=> 69X = 7(10^k - 1)
=> 69 divides 10^k - 1.
The order of 10 (mod 3) is 1; the order of 10 (mod 23) is 22. (This is equivalent to saying that the repeating parts of the decimal forms of 1/3 and 1/23 have length 1 and 22, respectively). Hence the order of 10 (mod 69) is also 22. Therefore k is 22.
This is real ugly, though; I like your solution much better.
(
Reply to this
)(
Parent
)
chrishartman
2006-03-24 02:02 am UTC
(
link
)
I forgot to note:
a) The answer is unique, up to the fact that you can repeat it as many times as you like.
b) The two digit (or more) extensions _must_ have leading 0s.
I wrote a quickie program to show the answer for all single digits in all bases up to 16, the results are in
this entry
.
(
Reply to this
)
Mini Sitemap:
Post to Journal
Downloads
LJ Gift Shop
Safety Tips
Support
&
FAQs
Be a Support Volunteer
Feedback
&
Contact Us
Report Abuse
Site News
More... (Full Sitemap)
Tour
|
Terms of Service
|
Privacy Policy
|
Copyright
|
Advertise
|
Viewing Options
|
Get a Free Blog / Journal
Explore LJ
Culture
Entertainment
Life
Music
News & Politics
Technology
Post to Journal
Interest
Region
Site & User
FAQ
Email
IM Info
Username:
Create an Account
Forgot your login?
Login w/ OpenID
Password:
Remember Me
English • Español • Deutsch • Русский…