Sunday, September 20, 2009

Smallest integer

What is the smallest integer greater than 0 that can be written entirely with 0s and 1s and is exactly divisible by 225?

This one's fairly easy.

Labels:

18 Comments:

Anonymous Anonymous said...

11100001

September 20, 2009 10:11 AM  
Anonymous Anonymous said...

NOOOOO!

It obviously can't end in a one.

PQ

September 20, 2009 11:01 AM  
Anonymous Anonymous said...

NOOOOO!

It obviously can't end in a one.

PQ

September 20, 2009 11:01 AM  
Blogger Ragknot said...

225 * 49382716 = 11111111100

September 20, 2009 11:05 AM  
Blogger Chris said...

Another 10 minute wonder. Ragknot got it. Dare I ask how you did it, Ragknot? :)

September 20, 2009 11:27 AM  
Blogger Ragknot said...

How? Keep adding 125 to previous total until I had nothing but ones and zeros.

No, not really, just multiplied 123456789 times 4 since 4* 225 = 900

September 20, 2009 12:43 PM  
Anonymous Anonymous said...

just noticed, the first post is 225 in binary

September 20, 2009 1:00 PM  
Blogger Ragknot said...

Using Binary? Wow that is great. Any number would be 1's and 0's!!!

a true trick of mind

September 20, 2009 1:05 PM  
Blogger Ragknot said...

I think I am wrong.

11100001 is a better answer

September 20, 2009 1:06 PM  
Blogger Chris said...

I should have said "in decimal notation". Never mind, as long as you're enjoying yourselves.

The "official" way to do it is to notice that 225 = 9*25. So the number must end with 00, 25, 50 or 75 - obviously only 00 is acceptable. The real trick is to remember that if a number is divisible by 9, then so is the sum of its digits, so it must begin with 9 1s.

September 20, 2009 1:23 PM  
Anonymous Anonymous said...

This is Agrajag.
It was my answer, first post.
I got so depressed trying to get my blogger account to work that I just put in the answer, hoping to beat all the people who can do maths.
I know that Chris didn't intend a binary answer because the puzzle label only had "mathschallenge" making us not think outside the box.

PS Am I the only one having blogger problems.

September 20, 2009 1:29 PM  
Blogger Chris said...

Hi Agrajag. I just had to do another post to get my last one through. At least on your own blog you can completely remove a post. I've had to go through hoops sometimes to get a new blog up or a new post through. It's been happening on and off for a couple of months.

An annoying thing is, that the posts do appear in the comment window (where you write a post).

I nearly put up the label trickofmind because of the official solution, but decided the problem didn't make the grade.

September 20, 2009 1:39 PM  
Blogger Chris said...

Hi again Agrajag, I was mean, I shouuld have complemented you for doing it in binary. Consider that as done.

September 20, 2009 2:28 PM  
Blogger Chris said...

Sorry, my mind is elsewhere as I've trying to fix a couple of computers. Ragknot, I've just re-read your 12:43 post. LOL should cover it, thanks.

I also quite liked the Anonymous post which went NOOOOO! I probably shouldn't encourage that sort of thing, but it made me laugh. Far better than the retard response of "you idiot" (always from a major idiot).

September 20, 2009 2:38 PM  
Blogger Ragknot said...

Chris,

Did you buy the 123456789 * 4?

That was cute, I knew that the answer had to end with 00, and that it would be a multiple of 900
(4*225) but clearly the most simple, straight forward path I saw was this, and it only took a minute.


Sub test()
Const k = 225
Dim r, c As Long
Debug.Print Now()
agn:
r = r + k
c = c + 1
If Left(r, 1) <> "1" Then GoTo nxt
If InStr(1, r, "2") Then GoTo nxt
If InStr(1, r, "3") Then GoTo nxt
If InStr(1, r, "4") Then GoTo nxt
If InStr(1, r, "5") Then GoTo nxt
If InStr(1, r, "6") Then GoTo nxt
If InStr(1, r, "7") Then GoTo nxt
If InStr(1, r, "8") Then GoTo nxt
If InStr(1, r, "9") Then GoTo nxt
Debug.Print c, r
Debug.Print Now()
End
nxt:
GoTo agn
End Sub

Result:

9/20/2009 7:14:05 PM
49382716 11111111100
9/20/2009 7:15:02 PM

September 20, 2009 5:20 PM  
Anonymous Anonymous said...

1000

September 20, 2009 5:27 PM  
Anonymous Anonymous said...

Previous Anonymous, how is it 1000? I think you're thinking about 250 instead of 225.

September 20, 2009 7:19 PM  
Blogger Chris said...

Hi Ragknot, you took me in for a few seconds - maybe it was just the shock of seeing something so crazy.

Thanks for your code. Nearly 50 million loops executed. If you did that by hand, 1 loop/sec (24/7), it would take nearly 19 months - aren't computers wonderful! Greetz.

September 21, 2009 2:58 AM  

Post a Comment

Links to this post:

Create a Link

<< Home