by **crnt2** » Wed Aug 06, 2008 11:33 am

I'd be interested to know a good answer for 12.

For your question above, I get the answer to be 43 by a combination of logic and trial and error. My reasoning:

If you can find six consecutive numbers that you *can* write as a sum of 6, 9 and 20 then you can get any number above the smallest in that sequence by adding multiples of six. So the problem becomes:

"Where does the first sequence of six numbers that *can* be written as such a sum occur?"

5 obviously can't, so we proceed by checking the numbers of the form 5n+6:

11 can't

17 can't

23 can't

29 can

So there is a possible sequence 24, 25, 26, 27, 28, 29 which *can* be written as such a sum. But actually 25 *cannot* be written as such a sum (easy to see) so we start checking the numbers of the form 6n+25

31 can't (we can't use 20 because 11 fails, and 31 isn't a multiple of 3)

37 can't (same reasoning as above)

43 can't (same reasoning as above)

49 can

So there is a possible sequence 44, 45, 46, 47, 48, 49

44 = 20 + 4 x 6

45 = 5 x 9

46 = 2 x 20 + 6

47 = 20 + 3 x 9

48 = 8 x 6

49 = 2 x 20 + 9

So the answer is 43.

Is there a quicker way? That took me about 10 minutes to do without any pressure, so I wouldn't like to get it in an interview!