Page 1 of 1
numerical sequence
Posted: Sat Nov 03, 2012 7:50 am
by idle
I'm trying to work out a formula to produce the number sequence starting with
1,3,10,35, 126 ...
I can't work it out even after a nice bottle of wine!
Re: numerical sequence
Posted: Sat Nov 03, 2012 7:59 am
by wilbert
Are those the only numbers you have got or do you have a few numbers more of the sequence ?
Re: numerical sequence
Posted: Sat Nov 03, 2012 8:01 am
by MachineCode
Lots of Google hits for that number sequence... does this help? ->
http://oeis.org/A001700
Re: numerical sequence
Posted: Sat Nov 03, 2012 6:57 pm
by Michael Vogel
Hi,
for such sequences, you can produce any number of formulas you like (what also means, that it is impossible to get a
single solution for the following number).
A simple possibility to calculate a simple polynom is to think about using the given values as points (1|1, 2|3, 3|10, 4|35, 5|126) and create a matrix to solve all given equations...
I downloaded a tool "
Eigenmath" which is available for Mac and Windows PC's and wrote a short script to simplify the whole story (press 'edit script', paste the following lines and then click on 'run script')..
Code: Select all
b=(1,3,10,35,126)
n=dim(b)
A=zero(n,n)
for(i,1,n,for(j,1,n,A[i,j]=i^(j-1)))
v=dot(inv(A),b)
v
The result means
y=26-655/12*x+973/24*x^2-149/12*x^3+35/24*x^4, which gives correct solutions for the given values. You can also calculate the next value by using Eigenmath, just enter
x=6 and then
26-655/12*x+973/24*x^2-149/12*x^3+35/24*x^4 into the command line.
Re: numerical sequence
Posted: Sat Nov 03, 2012 9:01 pm
by idle
thanks guys
It was a pattern I noticed looking at an ascending sorted list of n elements.
the number of 1's = the number of permutations for the given number of n
2/3 3/10 ....
11 111
12 112
22 113
122
123
133
...
machinecode, thanks for the link that helps explains it
wilbert, yes I gave up after 5/126
Michael - thanks that will be helpful