Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following sequences:

a = [0, 1, 2, 3, 4, 5]
b = [1, 2, 4, 7, 13, 26]
c = [1, 1, 2, 4, 7, 13]

I'm trying to reverse-engineer an undocumented API and believe that the values in a can be used to determine the corresponding values in b and c. For instance, we could say that third element in b (4) is two times the value in a (2), while the corresponding value in c is the same as a's. Unfortunately that algorithm doesn't work across all the values f the sequences. Does this make sense? If so, can anyone think of any common series that would give the values of b and c?

share|cite|improve this question
This is not mathematics. Maybe it is programming. – anon Oct 13 '10 at 16:39
Do the sequences extend, or they have exactly 6 terms? – Mariano Suárez-Alvarez Oct 13 '10 at 16:41
@muad I'm looking for an equation. I figured this site was more appropriate than Stack Overflow. – pr1001 Oct 13 '10 at 16:45
@muad: As is it's neither math nor CS but, rather, numerology. – Bill Dubuque Oct 13 '10 at 17:12
up vote 1 down vote accepted

Unfortunately, we don't have enough information here to reverse-engineer your problem. For instance, the Generalized Catalan Numbers have been referenced in the comments (by Qiaochu Yuan) because they appear in your sequence $b.$ This sequence starts $1,1,1,2,4,7,13,26,52,104,\ldots$

However, I could define a “random” sequence by $u_1=1$ and for $n>1$ $$U_n=2U_{n-1} \quad \textrm{ for } n \equiv 0,1 \textrm{ mod } 4$$ and $$U_n=2U_{n-1}-1 \quad \textrm{ for } n \equiv 2,3 \textrm{ mod } 4.$$

This follows the stated Catalan sequence exactly, and so contains your sequence $b,$ up until we get 103 instead of 104. I give this as an illustration that with the current information this problem has no definitive answer.

EDIT: To be fair to the question asker, I'd like to point out that the fact that he/she cannot do what he/she wants to do is often not so clear to people who've been brought up on a diet of school mathematics where one is frequently asked to fill in the missing number in a sequence or find the next number.

share|cite|improve this answer
Trees occur fairly naturally in computer science so if I had to bet, I would actually bet that it's the generalized Catalan sequence. But again, I'd appreciate more information. – Qiaochu Yuan Oct 13 '10 at 18:41
@Qiaochu Yes, you're probably right. I'm trying to help the asker realise the dilemma here. – Derek Jennings Oct 13 '10 at 19:03
Thanks Derek, though excuse me if I find your comments a little harsh! My question was whether there was a common series – I didn't assume there had to be one! – pr1001 Oct 14 '10 at 9:06
@pr1001 Sorry, I didn't mean to seem harsh. – Derek Jennings Oct 14 '10 at 9:17

The sequence $b$ can be obtained from $a$ by the function $$t \mapsto \frac{t^4}{12}-\frac{t^3}{2}+\frac{17 t^2}{12}+1$$ and the sequence $c$ using $$t \mapsto \frac{t^5}{60}-\frac{t^4}{6}+\frac{7 t^3}{12}-\frac{t^2}{3}-\frac{t}{10}+1.$$ I am pretty sure this is not what you want!

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.