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

  • Context: Undergrad 
  • Thread starter Thread starter uart
  • Start date Start date
  • Tags Tags
    Fun Sequence
Click For Summary

Discussion Overview

The discussion revolves around a numerical sequence defined by specific mathematical relationships and its connection to a combinatorial problem involving matching items to owners. Participants explore various methods to derive the next number in the sequence and discuss the underlying principles and implications of their findings.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant presents the sequence: 0, 1, 2, 9, 44, 265, and invites others to find a relation that predicts the next number.
  • Another participant proposes a recursive formula: an = n*(an-1 + an-2), calculating the next term as a6 = 1854.
  • A participant clarifies that the sequence relates to a problem of matching n items to their owners randomly, aiming to find the probability of total mismatches.
  • Three different sequences are presented, each yielding the same results but derived through different methods, highlighting the diversity of approaches.
  • One participant notes the interesting convergence of the probability of total failure to around 37% as n increases, suggesting a deeper mathematical significance.
  • Another participant speculates that the 37% probability is related to e^{-1}.
  • Confusion arises regarding the indexing of the sequences, with participants clarifying that they were using different starting points for their indices.

Areas of Agreement / Disagreement

Participants express differing views on the methods used to derive the sequence, with multiple competing approaches presented. There is no consensus on a single solution or method, and some confusion exists regarding the indexing of the sequences.

Contextual Notes

The discussion highlights the complexity of deriving sequences and the potential for multiple valid approaches to yield the same results. The dependence on different index sets may lead to misunderstandings in the calculations presented.

uart
Science Advisor
Messages
2,797
Reaction score
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
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
 
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.
 
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 probability 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:
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?
 
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:
Just a hunch, I think that "37%" is probably actually [tex]e^{-1}[/tex].
 
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:
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. :)
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 12 ·
Replies
12
Views
6K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K