Find the pattern of the following sequence and determine the next few terms:
2, 10, 12, 38, 42, 52, 56, 142, 150, 170
(In reply to
Official solution by Hugo)
I will defer to DJ when he responds, but in the meantime I hope this helps:
Step 1: Take a number in base 10
Step 2: Convert it into Binary
Step 3: Invert the digits (replace every 1 with a 0, and replace every 0 with a 1)
Step 4: Reverse the order of the digits (so abcd will read dcba)
Step 5: Compare the number in Step 4 with the number in Step 2. If they are the same then the base 10 number is allowed in the sequence.
I'm sure you already understood all that from DJ's solution, but I wanted to be able to refer to something systematic (like the steps). Ok, so let's check it out for 52 and 51.
Step 1: 52
Step 2: 110100
Step 3: 001011
Step 4: 110100
Step 5: 110100 = 110100 so it can be in the sequence
Step 1: 51
Step 2: 110011
Step 3: 001100
Step 4: 001100
Step 5: 001100 ¹ 110011 so it cannot be in the sequence.
So everything you said was right, but it just seems liked you missed comparing the inverted-then-reversed number to the original binary number. Either that or there was some confusion between inverting and reversing.
I hope that helps a bit until DJ officially clarifies.
|
Posted by nikki
on 2004-12-17 14:36:29 |