4
$\begingroup$

The infinite sequence begins with 0, 2, 1, 6, 3, 5, 4, 14, 7, 9, 8, 13, 10, 12, 11, 30, …

The full sequence contains every positive integer (and zero) exactly once.

What are the next 16 items of the sequence and why?

Hint 1: (includes the next 8 numbers in the sequence)

0,2,1,6,3,5,4,14,7,9,8,13,10,12,11,30,15,17,16,21,18,20,19,29

$\endgroup$
2
  • 1
    $\begingroup$ How many items? And does the \ and / have to do anything with it? $\endgroup$ Commented Mar 18 at 6:07
  • 1
    $\begingroup$ @user5127 Edited to extend the sequence and ask for 16 items. The / and \ are to differentiate the title from other number sequence puzzles, but are also on-theme. $\endgroup$ Commented Mar 18 at 6:40

1 Answer 1

5
$\begingroup$

Answer:

..., 15, 17, 16, 21, 18, 20, 19, 29, 22, 24, 23, 28, 25, 27, 26, 62, ...

Explanation:

For each n ≥ 0, given the first 2n-1 numbers in the sequence, the next number is 2n+1-2, and the next 2n-1 numbers are the first 2n-1 numbers plus 2n-1. Now we have 2n+1-1 numbers, and we repeat for n+1. It is not too hard to check that we generate all non-negative integers exactly once in this process.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.