Find the pattern: 12, 44, 130, 342, 840

1. Feb 24, 2015

beamthegreat

Hi I need help finding the pattern of the following sequence:

12, 44, 130, 342, 840, 1976, 4518, 10130, 22396, 48996

Any help will be appreciated. Thanks.

2. Feb 24, 2015

Raghav Gupta

Have you rechecked the terms carefully and if possible can you give a reference from where you have taken the problem?

3. Feb 24, 2015

Suraj M

Are you sure that there is a pattern? I mean solved question by someone else,is it??

4. Feb 24, 2015

beamthegreat

Yes I am very certain these sequences are correct. Here are the first 20 terms:

2
12
44
130
342
840
1976
4518
10130
22396
48996
106314
229166
491280
1048304
2227918
4718250
9961092
20971100

Here's a graph of these points plotted in excel:

5. Feb 24, 2015

beamthegreat

Here's another graph plotted on a logarithmic scale (base 10)

6. Feb 24, 2015

Raghav Gupta

You have not given 2 in the question
And from where you have taken the question?
It might be that you have made up your own numbers and then asking for a pattern?

7. Feb 24, 2015

beamthegreat

Look, if you're not gonna help me then why do you even bother posting? The pattern clearly follows an exponential trend and I need to find a method to convert a set of numbers I have into a polynomial function.

8. Feb 24, 2015

beamthegreat

Could you clarify what you mean? If its already solved by someone else then why would I post this question?

Also, if the pattern can't be expressed by any function, can anyone tell me the best fit curve to extrapolate the data? I tried using one in excel but its really bad.

9. Feb 24, 2015

micromass

beamthegreat, you absolutely need to tell us where you got these numbers. If you don't, then we can't help you.

10. Feb 24, 2015

beamthegreat

Its the population growth from one of a mod in Civilization V. If your not familiar with it, its basically a turn-based computer game. I recorded the values and want to find a function for it.

11. Feb 24, 2015

Raghav Gupta

As I suspected it could have been a random data from game and I bothered posting because I like finding pattern in sequences but it can become hard when you take any kind of numbers.
In this case software would be helpful, giving you approximate answers as it is difficult to do by hand.
See this

12. Feb 24, 2015

micromass

Yeah, but that wolframalpha program calculate a polynomial fit. But it's clear from the data that you want exponentials in there. Basically, it could be a formula of the form
$$(\alpha x^2 + \beta x + \gamma)e^{\delta x +\varphi} + (\mu x^2 + \nu x + \sigma)$$
or something very different or more complicated. If you know the exact form of the function, it's not so difficult to find the exact fit. But you don't know which functions are involved.

13. Feb 24, 2015

Pythagorean

Using cftool in matlab, I get:

f(x) = a*exp(b*x)
a = 14.61
b = 0.7462

14. Feb 25, 2015

Raghav Gupta

I may be misunderstanding this but when we are giving x=1 we are getting f(x) = 30 (approximately) which is not in sequence. So is it a wrong function for the pattern?

15. Feb 25, 2015

Svein

OK. I have found it. If we count the numbers from 1 upwards, the n'th number is given by $(n+1)(2^{n+1}-2-n)$

16. Feb 25, 2015

zoki85

Not necessarily. There's possibility no analytical function that coincides with all terms exactly but just functions that describe general trend of growth.

17. Feb 25, 2015

Raghav Gupta

Wow, that looks perfectly fine.
It was seeming like a complicated function for the pattern but you showed that it is actually not.
Now a curiosity has grown in me that how you came up with it when software like Wolfram was not able to compute a formula for the sequence. Can you tell? The copyrights are to you if you have not used a software.

Last edited: Feb 25, 2015
18. Feb 25, 2015

zoki85

19. Feb 25, 2015

Raghav Gupta

Sorry, I was in other state of mind.
I will edit it.

20. Feb 25, 2015

Svein

Well, I started out by trying to factorize the numbers. That didn't go well, but I observed that:
• All numbers were even
• All numbers could be factorized
That led me to try dividing all numbers by n - which did not work. But dividing by n+1 gave whole numbers as a result. Calculating the differences between the resulting numbers gave me 1, 3, 7, ... i.e. 2n-1. From there it was just a question of cleaning up the expression.