# Mathematical continuation of sequence:$\space \ldots, 7,6,6,6,6,6,5,5,5,5,4,4,4,3,3,2,$?

Is it possible to mathematically deduce the next element (to the right) in the following series? It continues in the same pattern to the left ($n-1$ copies of the positive integer $n$ on the left).
$$\ldots, 7,6,6,6,6,6,5,5,5,5,4,4,4,3,3,2,?$$

Is there a most natural continuation (analytical or smooth or nice) possibly of several or infinite elements?

-
Do you have an extra "6"? –  David Mitra Dec 5 '11 at 19:12
Yes, fixed thasnk –  The_Real_Harry_Potter Dec 5 '11 at 19:13
Your definition doesn't allow for any natural next element - you have defined a sequence that termintes on the right. –  Thomas Andrews Dec 5 '11 at 19:18
"Analytic" and "smooth" don't make sense for integer sequences. Sequences don't have unique next elements. –  Qiaochu Yuan Dec 5 '11 at 19:31
So if you're looking for a formula, try $\lceil \frac{1}{2} (\sqrt{1+8n}+1) \rceil$. –  Mikko Korhonen Dec 5 '11 at 19:50

The answer is "$42$".

We get a lot of these "what's the next number in the sequence" questions. And people often complain that an answer will depend on some "human emotion" about what constitutes a "natural next number." Mathematics is agnostic to such attributes, so we could put any number we like as the next one, and it would be perfectly "correct."

So I proclaim the answer is "$42$". Or, if you want something perhaps less arbitrary-feeling, then how about

$$\ldots, 5,5,5,5,4,4,4,3,3,2,0,-1,-1,-2,-2,-2,\ldots$$

the rule here being to write $|n-1|$ copies of $n$ in descending order.

-
In your language, I want the least arbitrary feeling –  The_Real_Harry_Potter Dec 5 '11 at 19:48
What do you mean by least arbitrary? You can use the Lagrange interpolation theorem for $P(1)=2, P(2)=3, P(3)=3, P(4)=4, P(5)=4, P(6)=4, P(7)=5, P(8)=5, P(9)=5, P(10)=5,$ $\text{}$$P(11)=6, P(12)=6, P(13)=6, P(14)=6, P(15)=6, P(16)=7, P(17)={\bf 42}$, and in "my language" a polynomial looks less arbitrary than a formula including least integer and roots.... –  N. S. Dec 5 '11 at 22:39
Theres a movie called The Oxford Murders, which is supposed to be about mathematicians but has terrible 'math' in it, and their 'research' consists of finding the next element in a sequence given the first couple entries. This is like that. –  AnonymousCoward Dec 5 '11 at 23:05
@N.S.: Congrats, you managed to break StackExchange's layout. In the future, may I suggest using $P(1)=2$, $P(2)=3$ etc. instead of putting everything inside a single pair of dollar signs. –  Ilmari Karonen Dec 5 '11 at 23:27

As m. k. points out this is given in A003057 (mirror imaged) with the explicit formula $a(n)=1+\lceil\frac{\sqrt{1+8n}}{2}\rceil$

-
I think you missed the square root. –  Mikko Korhonen Dec 5 '11 at 20:02
@m.k.: you're right. It was in my mind... Fixed. –  Ross Millikan Dec 5 '11 at 20:06
So to continue we have to ask what is the ceiling of a complex number... –  GEdgar Dec 5 '11 at 22:42
@GEdgar: as the dots are at the left, I assumed it only continued in that direction. Over there, the square root is real. That is why I said mirror imaged. –  Ross Millikan Dec 5 '11 at 23:57
I understood the OP wanted a continuation where he wrote the '?' on the right. –  GEdgar Dec 6 '11 at 1:06