Simple algorithm / method for generating a sequence

http://oeis.org/A005773

I've looked at this page, but most of the acronyms don't make any sense.

Gf: 2x / (3x-1 + sqrt (1-2x-3x ^ 2)) - Len Smiley (Smiley (ATS) math.uaa.alaska.edu).

Does Gf have a spawn function? Substituting any values ​​for x, we get the square root of a negative number (imaginary). How does it generate the sequence? Any help would be greatly appreciated.

Edit: At the bottom of the page, there are some examples using specialized languages ​​like Mathematica, Maple, etc. that I'm not familiar with. Any explanation with languages ​​like C, Java or Python would be really helpful.

+3


source to share


2 answers


If you have a sequence {a0, a1, a2, a3, ... }

, then its generating function

f(x) = sum aj x^j

      

For example, the sequence {1, 1, 1, 1, ... }

has

f(x) = 1 + x + x^2 + x^3 + ...

      

Conveniently, this function has a closed expression

f(x) = 1 / (1 - x)

      

and so we say what 1 / (1 - x)

is the generating function for {1, 1, 1, 1, ... }

.



For your function, 2x / (3x - 1 + sqrt(1 - 2x - 3x^2))

you need to expand that function in your Taylor sequence about x0 = 0

and then you will have sequence terms.

If you are using Wolfram Alpha , you will see that the first few terms

1, 1, 2, 5, 13, 35, 96, 267, ...

      

and then if you are using OEIS you get

A005773 Number of directed animals of size n (or directed n-ominomas in a standard position).

which will go back to where you started showing that this generating function does indeed generate this sequence.

There's a really interesting book called generatefunctionology on this topic that you can download for free. Enjoy!

+5


source


Yes, Gf stands for Generation Function. The series expansion of this expression at x = 0 gives a power series in x, the coefficients of which are a sequence.

Extending Wolfram Alpha



My entrance was

Series[2x/(3x-1+Sqrt[1-2x-3x^2]), {x, 0, 10}]

      

+1


source







All Articles