Go back
What is the formula for this number pattern?

What is the formula for this number pattern?

Science

h

Joined
06 Mar 12
Moves
642
Clock
30 Dec 19
7 edits
Vote Up
Vote Down

I would like the equation for this number pattern generated by one of my computer programs that generated it via an extremely complex maths iteration;

1, 2, 5, 8, 13, 19, 25, 33, 42, 51, 62, 74, 86, 100, 115, 130, 147, 165, ...

It was generated by inputting an integer c and outputting an integer s so that they correspond thus;

If c=1 then s=1
If c=2 then s=2
If c=3 then s=5
If c=4 then s=8
If c=5 then s=13
If c=6 then s=19
If c=7 then s=25
If c=8 then s=33
If c=9 then s=42
If c=10 then s=51
If c=11 then s=62
If c=12 then s=74
If c=13 then s=86
If c=14 then s=100
If c=15 then s=115
If c=16 then s=130
If c=17 then s=147
If c=18 then s=165

My computer program cannot do it for c over 18 because if c>18 then it cannot cope with the huge factorials in the iteration.

I tried WolfranAlpha this sequence and it showed me both some more numbers continuing in that sequence and an equation for it but that equation doesn't make any sense to me because it is an equation with letter z and I don't get what that z is supposed to be but here is that equation;

G_n(a_n)(z) = (z^5 - 2 z^4 + z^3 - 2 z^2 - 1)/((z - 1)^3 (z^2 + z + 1))

I tried various integer values for z above but it doesn't seen to output integers with that so don't get it.
So what does that z represent and that "G_n(a_n)(z)" mean?
The equation is no good to me if I don't understand how to use it.

Anyone?

bunnyknight
bunny knight

planet Earth

Joined
12 Dec 13
Moves
2917
Clock
30 Dec 19
Vote Up
Vote Down

@humy
Perhaps some friendly person with access to that Summit supercomputer might be able to help you 🙂

D
Losing the Thread

Quarantined World

Joined
27 Oct 04
Moves
87415
Clock
31 Dec 19
Vote Up
Vote Down

@humy said
I would like the equation for this number pattern generated by one of my computer programs that generated it via an extremely complex maths iteration;

1, 2, 5, 8, 13, 19, 25, 33, 42, 51, 62, 74, 86, 100, 115, 130, 147, 165, ...

It was generated by inputting an integer c and outputting an integer s so that they correspond thus;

If c=1 then s=1
If c=2 then s=2
...[text shortened]... "G_n(a_n)(z)" mean?
The equation is no good to me if I don't understand how to use it.

Anyone?
https://en.m.wikipedia.org/wiki/Generating_function

h

Joined
06 Mar 12
Moves
642
Clock
31 Dec 19
1 edit
Vote Up
Vote Down

@deepthought said
https://en.m.wikipedia.org/wiki/Generating_function
Thanks for that.
But I am afraid I still don't get it;
So that "G_n(a_n)(z)" is another way of saying " ∑[n=0, ∞] a{n} z^n " ?
But then what is that above "a" and that "z" referring to? Is that "a" my "c" variable? If not, where do I input c?
And how do I go from, say, c=3 input to s=5 output? Can I be given just one specific example of how I go from one specific input to an output?

h

Joined
06 Mar 12
Moves
642
Clock
01 Jan 20
9 edits
Vote Up
Vote Down

I have got another maths pattern problem to solve but this time for patterns of formulas;

I worked out that for some function of natural number x for x=1 and then x=2 and then x=3 have the fomulas with the natural number n input thus;

if x=1 then formula is; 1,

if x=2 then formula is; 2^(n+1) - 1

if x=3 then formula is; (3^(n+2) - 2^(n+3) + 1)/2

if x=4 then formula is; ?

I want to guess what the next formula is (for x=4) and the next etc because I tried to work it out algebraically but gave up trying because its just gets to difficult.
I don't see a clear pattern in this above sequence of formulas although factorials might be invloved so it could be that it involves " / (n - 1)! " so for x=4 the formula might be appended with " / 6 ".

But another BIG clue is that I HAVE worked out with great difficulty (it took me 2 whole days) that if x=4 then we MUST necessarily have;

if x=4 and n=1 then (as yet unknown) formula with n must output number 10.

if x=4 and n=2 then (as yet unknown) formula with n must output number 65.

if x=4 and n=3 then (as yet unknown) formula with n must output number 350.

if x=4 and n=4 then (as yet unknown) formula with n must output number 1501.

But then the maths gets far to complicated to work that out for n=5 or above and unfortunately there isn't enough numbers in the above to work out form that alone what the formula might be but at least that's a big clue because if your guess for the formula for x=4 doesn't output those numbers then it must be wrong.

With these two clues; Anyone with a guess of what the pattern of formulas might be?

h

Joined
06 Mar 12
Moves
642
Clock
01 Jan 20
1 edit
Vote Up
Vote Down

@humy said
I have got another maths pattern problem to solve but this time for patterns of formulas;

I worked out that for some function of natural number x for x=1 and then x=2 and then x=3 have the fomulas with the natural number n input thus;

if x=1 then formula is; 1,

if x=2 then formula is; 2^(n+1) - 1

if x=3 then formula is; (3^(n+2) - 2^(n+3) + 1)/2

if x=4 then f ...[text shortened]... ust be wrong.

With these two clues; Anyone with a guess of what the pattern of formulas might be?
My above misedit;

" if x=4 and n=4 then (as yet unknown) formula with n must output number 1501. "

should be

" if x=4 and n=4 then (as yet unknown) formula with n must output number 1509. "

So for x=4 and n=4 output isn't 1501 but 1509.

D
Losing the Thread

Quarantined World

Joined
27 Oct 04
Moves
87415
Clock
01 Jan 20

@humy said
Thanks for that.
But I am afraid I still don't get it;
So that "G_n(a_n)(z)" is another way of saying " ∑[n=0, ∞] a{n} z^n " ?
But then what is that above "a" and that "z" referring to? Is that "a" my "c" variable? If not, where do I input c?
And how do I go from, say, c=3 input to s=5 output? Can I be given just one specific example of how I go from one specific input to an output?
So that "G_n(a_n)(z)" is another way of saying "∑[n=0, ∞] a{n} z^n "?
That's correct. But the generating function doesn't tell you how to get from the n-th to the (n + 2)-th term, it encodes the entire sequence in a single function. You just get the term back out of the Generating function by working out its Taylor series. So for the zeroth term you just stick in z = 0 and get:

G_n(a_n)(0) = (- 1)/((- 1)^3) = 1.

For the n = 1 term you need to differentiate and set z = 0 in the first derivative and extract the term.

In general if a sequence {a, b, c, d, ....} has a generating function G(z). Then the Taylor expansion of G(z) is:

G(z) = a + bz + cz^2 + dz^3 + ...

To get the third term (c) we differentiate twice, and get:

G''(0) = 2c + 6dz + ... = 2c.

Note that you need to divide by n! to get the n-th term. Wolfram might be using a Generating function of the form:

G(z) = a + bz + cz^2/2 + .... + k z^n / n! + ...

In which case you'll get the term in the sequence directly, otherwise you'll need to compensate for the "n!".

Differentiating G(z) beyond eighteenth order with paper and pencil is going to be a pain so you might want to get a symbolic manipulation program. The best ones are things like Mathematica, MatLab and Maple, but they cost a bomb, there are free ones but they're generally quite limited, so you'll need to look around for one that can differentiate elementary functions.

h

Joined
06 Mar 12
Moves
642
Clock
02 Jan 20
1 edit
Vote Up
Vote Down

@humy said
My above misedit;

" if x=4 and n=4 then (as yet unknown) formula with n must output number 1501. "

should be

" if x=4 and n=4 then (as yet unknown) formula with n must output number 1509. "

So for x=4 and n=4 output isn't 1501 but 1509.
Arr I had completely given up on the problem but while I was revising my work I spotted a maths mistake I made and that 1509 output should have been 1701.

So, with this correction; for x=4 and n=4 input, output is 1701.

And I have wolfalpha it and wolfalpha has at last given me a sensible formula for it that I understand and NOW I am making real progress!
It will take me quite some time to fully simulate this new information and do all the necessary maths checks but I will report back here on my progress when I have.

h

Joined
06 Mar 12
Moves
642
Clock
03 Jan 20
Vote Up
Vote Down

@humy said
Arr I had completely given up on the problem but while I was revising my work I spotted a maths mistake I made and that 1509 output should have been 1701.

So, with this correction; for x=4 and n=4 input, output is 1701.

And I have wolfalpha it and wolfalpha has at last given me a sensible formula for it that I understand and NOW I am making real progress!
It will ...[text shortened]... mation and do all the necessary maths checks but I will report back here on my progress when I have.
I now worked out the next formula down and then worked out the general equation for all those formulas which is;

∑[k=0, x-1] (-1)^k (x - k)^(r+x) x! / ( k! (x - k)! )

Which is great because that I think is probably the very last of what I would call the 'difficult' maths for my research and the rest will all be all 'easy' maths I think which means it shouldn't be many more months before I finally finish my research!

h

Joined
06 Mar 12
Moves
642
Clock
03 Jan 20
4 edits
Vote Up
Vote Down

@humy said
I now worked out the next formula down and then worked out the general equation for all those formulas which is;

∑[k=0, x-1] (-1)^k (x - k)^(r+x) x! / ( k! (x - k)! )

Which is great because that I think is probably the very last of what I would call the 'difficult' maths for my research and the rest will all be all 'easy' maths I think which means it shouldn't be many more months before I finally finish my research!
Just one more maths question here;

Can that (re-expressed) summation of;

∑[k=0, n-1] (n - k)^(r+n) (-1)^k n! / ( k! (n - k)! )

be simplified to a NONE summation by it being factorized?
The reason why I think there just might be a way is because I see contained in there, more specifically the "(-1)^k n! / ( k! (n - k)! ) " part, binomial coefficients, which implies to me it just might be a way to simplify it by factorizing it.
I tried to see if I could factorize it but so far I just cannot get past the " (n - k)^(r+n) " component of the summation for that because that part to me seems to me to 'get in the way' of factorization.

Anyone?

h

Joined
06 Mar 12
Moves
642
Clock
03 Jan 20
Vote Up
Vote Down

@humy said
Just one more maths question here;

Can that (re-expressed) summation of;

∑[k=0, n-1] (n - k)^(r+n) (-1)^k n! / ( k! (n - k)! )

be simplified to a NONE summation by it being factorized?
The reason why I think there just might be a way is because I see contained in there, more specifically the "(-1)^k n! / ( k! (n - k)! ) " part, binomial coefficients, which implies to m ...[text shortened]... ation for that because that part to me seems to me to 'get in the way' of factorization.

Anyone?
Actually, I have just noticed that r and n are just constants in this context thus we can just let m = r+c and simplify that slightly to just;

∑[k=0, n-1] (n - k)^m (-1)^k n! / ( k! (n - k)! )

where m is some arbitrary positive natural number constant.

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.