Just for fun : What's the next number in this sequence ?

In summary, the given sequence follows a pattern where each term is equal to the index number multiplied by the sum of the two preceding terms. This was derived from a real-world problem of matching items with their owners. Three different solutions were proposed, all of which yield the same sequence. The probability of getting every item incorrect in this problem converges to approximately 37%, which is equivalent to e^-1.
  • #1
uart
Science Advisor
2,795
21
0, 1, 2, 9, 44, 265 ...

Assume that the sequence has no "randomly" assigned values. That is, that (perhaps apart from the first) all the elements can be deduced from the index integer (n=1,2,3, etc) and the preceding values of the sequence.

I don't claim there is a unique solution or anything, I'm just wondering if anyone can dream up a relation that fits the given data and predicts the next point. :)
 
Last edited:
Mathematics news on Phys.org
  • #2
a0 = 0
a1 = 1

from n > 2

an = n*(an-1 + an-2)

so
a2 = 2*(a1 + a0) = 2*(1 + 0) = 2
a3 = 3*(a2 + a1) = 3*(2 + 1) = 9
a4 = 4*(a3 + a2) = 4*(9 + 2) = 44
a5 = 5*(a4 + a3) = 5*(44 + 9) = 265
a6 = 6*(a5 + a4) = 6*(265 + 44) = 1854
 
  • #3
I should of course mention that there is a solution and that I didn't just pick those numbers a random or anything annoying like that. :)

Also it relates to a "real world" problem which I will reveal later.
 
  • #4
Very well done Guybrush Threepwood, it took you all of about one minute. (quicker than I could type my clarifying follow up post).


The problem from which the sequence was derived is as follows :

Consider the problem of matching up n items with their respective owners and doing it randomly. (Just like the recent problem posted here about a waiter handing the five different coats back to the five different patrons in the restaruant).

I was just trying to work out in how many ways you could get it totally wrong so that nobody at all got their correct item (and hence the probablity of getting every one wrong).

At first I had some trouble doing it analytically so I just manually enumerated the first few terms and tried to guess the sequence in the hope that it would inspire me to think of an analytic solution.

What is interesting is that I eventually got an analytically derived solution and it "looked" totally different to my guessed solution, yet did in fact yield an identical sequence when I calculated it.

Even more interesting is that your solution is different again (to both my solutions) yet also yeilds the same sequence. I'm sure it would be possible to prove that all three sequences are identical, though I haven't got time right now.

Here are the three sequences.

1. (Guessed by me) [tex]x_n = n \, x_{n-1} + 2\, {\rm even}(n) - 1[/tex]

2. (solved by me) [tex]x_n = n! - 1 - \sum_{k=1}^{n-1} {\rm C}_k^n \,x_k [/tex]

3. Guybrush Threepwood's solution. [tex]x_n = (n-1)\, (x_{n-1} + x_{n-2}) [/tex]

Note that even(n) is the function that is 1 if n is even and zero if n is odd.

As you can see my solution is pretty ugly, I like Guybrush's much better. Cool how they all give the same answer though. :)


PS. Note that I changed the "n" in Guybrush's formula to "n-1" simply to make it consistent with the index set of [1,2,3..] that I had used as opposed to [0,1,2..]
 
Last edited:
  • #5
Originally posted by uart
Very well done Guybrush Threepwood, it took you all of about one minute.

will there be a free beer or something as prize?
 
  • #6
Actually it's quite an interesting result because the probility of getting every one incorrect ([tex]x_n/n![/tex]) converges pretty quickly to a value of around 37%. So it seems that any time there are about 5 or more items then your chances are quite close to about 37% of total failure. No matter how large you make n, hmmm very interesting. :)
 
Last edited:
  • #7
Just a hunch, I think that "37%" is probably actually [tex]e^{-1}[/tex].
 
  • #8
I'm confused:

your first solution
[tex]x_n = n \, x_{n-1} + 2\, {\rm even}(n) - 1[/tex]
would give for 2
[tex]x_2 = 2 \, x_{2-1} + 2\, {\rm even}(2) - 1[/tex] = 2*1 + 2*even(2) - 1 = 2 + 2 - 1 = 3

edit
ah, forget it, you begin your series with index 1...
too much programming:smile:
 
Last edited:
  • #9
Guy, it's just that we were working on different index sets. I edited the above to clarify that but it might not have shown up on your browser yet (try refresh).

I was working on an index set of [1,2,3...] and you were working on [0,1,2..]. Use my index set and you will see all three results are compatible. :)
 

1. What is the purpose of this sequence?

The purpose of this sequence is simply for fun and to engage in a mental exercise. It does not have any scientific or mathematical significance.

2. Is there a specific formula to determine the next number in the sequence?

No, there is no specific formula. This sequence is open-ended and can have multiple possible answers.

3. Can the sequence be solved using mathematical principles?

While there may be patterns and mathematical principles at play, this sequence is not meant to be solved in a scientific or mathematical manner. It is meant to be a fun and creative exercise.

4. Can the next number be predicted based on the previous numbers?

Yes, in some cases the next number can be predicted based on the patterns and trends in the previous numbers. However, as this is a just for fun exercise, there may not always be a clear pattern.

5. Can this sequence be extended to include more numbers?

Yes, this sequence can be extended as long as desired. The next number can be determined based on the patterns and creativity of the person continuing the sequence.

Similar threads

  • General Math
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
15
Views
1K
Replies
12
Views
5K
Replies
16
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Programming and Computer Science
Replies
27
Views
2K
  • General Discussion
Replies
12
Views
2K
Replies
13
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
Replies
1
Views
2K
Back
Top