# Is this sequence that hard?

I published a sequence that seems difficult to the general public, so I've thought of posting it here. It has a very simple logic (language independent). Can you figure out the next number?

• Would I sound pedantic if I said that there is a polynomial solution to any finite number sequence? And that there are always an infinite number of solutions anyways? May 18, 2016 at 16:00
• I think the polynomial interpolation for these 9 numbers can be fairly complex compared to the intended solution. May 18, 2016 at 16:32
• @fffred I'm surprised Mathematica doesn't have a "generate number sequence puzzle solution" built-in, then we could really annoy people who ask these. May 18, 2016 at 16:58
• @fffred. Totally agree, there are infinite solutions to this. I get particularly irked when these problems are framed such that you're a 'genius' if you can figure it out (not the case here, but it is inferred a wee bit). I cant find it in web searches, but I remember reading about Feynman or maybe Neumann (very different personalities!) who kept interrupting someones speech with solutions when they posed a similar 'problem' (with a singular solution expected :). May 18, 2016 at 22:04
• @LamarLatrell OEIS wouldn't provide the infinite solutions that exist, but does have the one OP had in mind: oeis.org/A090928 May 19, 2016 at 6:50

Probably way over thinking this:

18

There is a hint that:

The background of the image is the Milky Way Galaxy, a spiral galaxy.

Reason:

Start by writing the natural numbers out in a spiral, as follows:

  25 10→11→12→13
↑  ↑        ↓
24  9  2→ 3 14
↑  ↑  ↑  ↓  ↓
23  8  1  4 15
↑  ↑     ↓  ↓
22  7 ←6 ←5 16
↑           ↓
21←20←19←18←17
Now flip the numbers vertically:
  21 20→19→18→17
↑  ↑        ↓
22  7  6→ 5 16
↑  ↑  ↑  ↓  ↓
23  8  1  4 15
↑  ↑     ↓  ↓
24  9 ←2 ←3 14
↑           ↓
25←10←11←12←13
And horizontally:
  17 18→19→20→21
↑  ↑        ↓
16  5  6→ 7 22
↑  ↑  ↑  ↓  ↓
15  4  1  8 23
↑  ↑     ↓  ↓
14  3 ←2 ←9 24
↑           ↓
13←12←11←10←25
Now simply follow the spiral and read them out.

• What! I chosed the Milky Way image randomly! And, yes, it turns out it is a hint! May 18, 2016 at 16:29
• How do you even think about this so quickly :o ? May 18, 2016 at 16:30
• Uh... This is "a very simple logic"? :P May 18, 2016 at 18:57
• Rather than doing all the flipping - Just create the spiral and then follow a spiral rotated by 180.
– Joel
May 18, 2016 at 19:20
• Even though the OP didn't mean for the background image to be a hint, your attention to detail remains very impressive. May 18, 2016 at 20:38

0 because it's the only digit not used yet

• arrgh! Beat me by seconds... :-) I have a feeling that there's more to this though...
– Ben
May 18, 2016 at 15:47
• @Ben - 66 seconds is probably too long to be characterized as "seconds". ;)
– TTT
May 18, 2016 at 19:07
• Personally, I often regard anything more than 0 seconds as "merely seconds" As in "We made love for hours, yet she correctly told me It was 'merely seconds.'" May 18, 2016 at 20:21

10

Because

if you place a mirror in the middle of the sequence (between the 9 and the 2), every number and its reflection would add up to 11 (and the "?" is opposite the 1).

• Quite interesting, but then, how would you continue the sequence? (I didn't say it was infinite, though) May 19, 2016 at 7:29
• I assumed it was finite when I saw that you didn't deny it when @fffred commented "there's polynomial solution to every finite sequence". May 19, 2016 at 7:38
• @AimanAl-Eryani: The "finite sequence" that fffred refers to is the nine elements supplied in the puzzle: 1,6,7,8,9,2,3,4,5. The point (s)he was making is that there's always a polynomial p such that p(i) is the ith element of the sequence, and since a polynomial is defined for all real numbers, you can always use the polynomial to trivial extend the sequence to an infinite one. (In fact, there are infinitely many such polynomials, though only one of minimal degree.) May 19, 2016 at 22:54
• If you inspect the 16 numbers following those given in the puzzle, and then the 24 numbers after that, you'll see similar. :) May 20, 2016 at 2:41

OEIS says

18

(Beginning of sequence A090928: "Permutation of natural numbers arising from a spiral.")

It includes a comment which is much the same as the reason given by p.s.w.g., but

doesn't flip. It just reads out counterclockwise after writing clockwise:

 17.16.15.14.13
18..5..4..3.12
19..6..1..2.11
20..7..8..9.10
21.22.23.24.25

(Actually, that's one of 2 sequences in OEIS. There's also one where the nine digits appear thirty some positions into the sequence. Wouldn't make a good puzzle.)

• (1) I don't know what "OEIS" is; please spell it out and provide a link.  (2) Answers on Stack Exchange should be self-sufficient and free-standing.  Even in conjunction with p.s.w.g.'s answer, I don't understand this answer.  Please explain the logic. (3) Use spoiler markdown, not code block. May 18, 2016 at 22:12
• @PeregrineRook: OEIS is the Online Encyclopedia of Integer Sequences. May 18, 2016 at 23:53

The simplest answer is:

10

And my reason is better than Aiman Al-Eryani's because there is no arbitrary mirror position.

1 , 2,3,4,5 , 6,7,8,9 , 10,11,12,13 , ...

6,7,8,9 , 10,11,12,13 , ...

(Just take one block at a time alternating between the sequences.)

• This is the best answer, to me. "Simple logic" is to make as little steps as possible, and constructing a spiral is NOT simple. May 20, 2016 at 10:29
• @Pimgd: Exactly. You might be interested in reading about Kolmogorov complexity, which is one way to make "as little steps as possible" precise. For example if we fix the Turing-complete language as Javascript, my solution is expressed by the function f(n){return (n-2>>3<<2)+(n+2)%8+2;}. I challenge anyone to beat that (in Javascript of course)! May 20, 2016 at 14:30
• I came up with 10 for the same reason. I agree it's the simplest conclusion. May 20, 2016 at 14:48

Well I got 2.

Series is: 1, 6, 7, 8, 9, 2, 3, 4, 5, x

Start from central pair:

9 - 2 = 7

8 - 3 = 5

7 - 4 = 3

6 - 5 = 1

therefore, 1 - x = -1

=> x = 2

Is it

0
Because it's the only digit not represented yet...

It is

10

Because

it starts out 1, leaps out by 5, then does a sequence of 4 numbers, then jumps down by 7, repeat. Adding 5 to 5 yields 10.

14

Solution:

Take the natural numbers and always swap tuples with a length of 4. Starting from

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...

the resulting sequence is

1, 6, 7, 8, 9, 2, 3, 4, 5, 14, 15, 16, 17, 10, 11, 12, 13, 22, ...