Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Generating function

  1. Dec 27, 2011 #1
    Does exist general formula for nth term in sequence if I have generative function?
    In my case, generative function is (1/(1-x))-(1/(1-x^3)).
  2. jcsd
  3. Dec 27, 2011 #2
    I think so but you may have to give the 1st 3 terms and the generating function.
  4. Dec 27, 2011 #3
    I don't have to give 1st 3 terms. If I have generating function, the sequence is strictly given, and I just want to have formula for getting nth term in the sequence.
    Now, what is the formula?(general formula, and formula for my case)
  5. Dec 27, 2011 #4
    Emilio, there is a simple rule that people asking for help should know. If people who are willing to help ask for something, you better provide it if you want their help. Reading your answer motivates people not to answer your question. Arrogance does not help.
  6. Dec 27, 2011 #5


    User Avatar
    Science Advisor

    Nonsense. There are different types of generating functions: "ordinary generating functions", "exponential generating function", "Dirchlet generating functions" and so on. They each have own rules for manipulation (especially multiplication), and what you need to do to obtain the individual terms is different. Just telling us "here is a generating function" gives no information about the underlying series.

    More to the point, that process is directly obtained from the definition of the generating function you are using. It's the same process of obtaining terms from a Taylor series. If you have not studied generating functions before then I suggest you read Generatingfunctionology. It's free off the web.
  7. Dec 27, 2011 #6
  8. Jan 13, 2012 #7
    The sequence you give has the Taylor series coefficient function 4/3Sin(Pi*n/3)^2, which may simplify further given n is an integer.

    If you want a general form for the coefficients of a generating function, you can use an contour integral from complex analysis which extracts the coefficient:

    [itex]\frac{1}{2\pi i}\oint_{|z|<1}\frac{f(z)}{z^{n+1}}dz[/itex],

    where f(z) is your generating function, and n is the element index in the sequence you are trying to obtain. You can use the substitution [itex]z=e^{iy}[/itex] with the new limits [itex]y=0[/itex] and [itex]y=2\pi[/itex] to compute the integral.

    This can be more useful than the Taylor approach sometimes, but as has been said before generating functions come in many different forms, and it is best to learn the art in general really. You may find that if your generating function has no "nice" pattern to it, then you cannot find a sequence function (e.g. 2 + 3x + 5x^2 + 7x^3 + 11x^4 + ... + p_n x^n + ..., where p_n is the n-th prime)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook