5
$\begingroup$

One day I was strolling through the halls of my university when I came across a computer attached to a monitor. The text on the monitor said:

Program displays list of numbers.

Next to the computer lay a large roll of graph paper. It looked like the paper could be used to write down a sequence of numbers and be put into a large slot below the computer. Because of my inquisitive nature and interest in computers I decided to try it out, so I cut out a piece of paper and wrote a couple of numbers on it. I thought I would know exactly how to do it. When I put the paper in the slot, however, the monitor displayed the following number: \begin{align*} 2 \end{align*} I was surprised, this was not the number I had tried to display! I had, for one thing, tried to display more than one number. I decided to try again, but this time I cut out a larger piece of paper and wrote down the same sequence twice as far. After feeding my piece of paper to the slot, the monitor displayed: \begin{align*} 12\ \ 10 \end{align*} I really had no idea where these numbers were coming from. The sequence I had try to display is very simple, but the output seemed to consist of random numbers. Well, I was persistent, so I wrote down more terms of the same sequence on a larger piece of paper and fed it to the computer again. The numbers displayed were: \begin{align*} 240\ \ 204\ \ 170 \end{align*} Again, total bewilderment, what kind of crazy algorithms were controlling this output? I cut out a large piece of paper and tried one more time. The output was: \begin{align*} 65280\ \ 61680\ \ 52428\ \ 43690 \end{align*} After this display, I left, deciding that the computer was broken. Later, after having recounted my story, one of my professors told me the computer works fine. What was I doing wrong?

$\endgroup$
4
$\begingroup$

The numbers output, when written

in binary,

are as follows:

10
1100 1010
11110000 11001100 10101010
1111111100000000 1111000011110000 1100110011001100 1010101010101010

The pattern is clear enough. It doesn't seem to me like we have enough information to determine with certainty what the computer was doing and what you did wrong, but here is one possibility:

The sequence of numbers you were entering portions of was the sequence of non-negative integers: 0, 1, 2, 3, etc. You took the graph paper to indicate that you should enter the numbers in binary, perhaps shading squares occupied by 1-bits and leaving blank the others. But you got your x and y axes the wrong way around.

So, e.g.,

at the second step you wanted to enter 0,1,2,3. So you shaded squares like this: .. 0 .# 1 #. 2 ## 3 but the computer read up the columns instead of across the rows: ##.., #.#. Hence 12, 10.

There is one thing I find slightly unsatisfactory about this answer:

I do not believe that someone thinking in those terms would be so baffled by the computer's output. You're already thinking in binary and turning numbers into patterns of bits on a grid, after all.

$\endgroup$
  • $\begingroup$ You got it exactly right :). I think the extreme confusion was the joke, sort of, but I understand your dissatisfaction, I just have to work more on my storytelling. I came up with the sequence and really liked to post it as a puzzle, but I read that you shouldn't just post a list of numbers with the task: continue the sequence. Since, indeed, any number can follow really. So I tried to make up a story around it. I'm happy you got it :). $\endgroup$ – Pjotr5 Mar 12 '17 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.