# Generating Functions

**URL:** <https://community.wolfram.com/t/generating-functions/7053>\
**Category:** Questions\
**Tags:** calculus\
**Created:** [October 28, 2015, 3:28pm UTC](https://community.wolfram.com/t/generating-functions/7053 "2015-10-28T15:28:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![zevskaban](https://avatars.discourse-cdn.com/v4/letter/z/ccd318/32.png) [@zevskaban](https://community.wolfram.com/u/zevskaban)\
**Post date:** [October 28, 2015, 3:28pm UTC](https://community.wolfram.com/t/generating-functions/7053/1 "2015-10-28T15:28:55Z")

</div>

Hello.  
I have a generating function G(t) = E^(-2\*t^2)

How I can find using wolfram generate term of sequence which generates this function?

---

<div class="post-metadata">

**Author:** ![sghuisman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sghuisman/32/27850_2.png) [@sghuisman](https://community.wolfram.com/u/sghuisman)\
**Post date:** [October 28, 2015, 4:00pm UTC](https://community.wolfram.com/t/generating-functions/7053/2 "2015-10-28T16:00:31Z")

</div>

Welcome to the Wolfram Community,

Have you looked at the functions `Series` and `InverseSeries` and their help? There must be an example that you can use.

I’m not sure if your question is posed correctly; you want to generate terms that generates the function or generate terms that the funtion generates?

---

<div class="post-metadata">

**Author:** ![zevskaban](https://avatars.discourse-cdn.com/v4/letter/z/ccd318/32.png) [@zevskaban](https://community.wolfram.com/u/zevskaban)\
**Post date:** [October 28, 2015, 4:07pm UTC](https://community.wolfram.com/t/generating-functions/7053/3 "2015-10-28T16:07:18Z")

</div>

I have generating function G(t)  
I want to know how looks a\_n

for example  
if i have G(t) = 1/(1-t)  
a\_n = 1 for any n

---

<div class="post-metadata">

**Author:** ![sghuisman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sghuisman/32/27850_2.png) [@sghuisman](https://community.wolfram.com/u/sghuisman)\
**Post date:** [October 28, 2015, 4:10pm UTC](https://community.wolfram.com/t/generating-functions/7053/4 "2015-10-28T16:10:20Z")

</div>

Table[SeriesCoefficient[1/(1 - t), {t, 0, n}], {n, 1, 10}]

You can query specific coefficients of the series using `SeriesCoefficient`. What have you tried yourself?

---

<div class="post-metadata">

**Author:** ![zevskaban](https://avatars.discourse-cdn.com/v4/letter/z/ccd318/32.png) [@zevskaban](https://community.wolfram.com/u/zevskaban)\
**Post date:** [October 28, 2015, 4:14pm UTC](https://community.wolfram.com/t/generating-functions/7053/5 "2015-10-28T16:14:26Z")

</div>

Table[SeriesCoefficient[e^(-2t^2), {t, 0, n}], {n, 0, 10}]

It gives me table of values for each n  
but I want to get a formula for a\_n depends on n.

---

<div class="post-metadata">

**Author:** ![sghuisman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sghuisman/32/27850_2.png) [@sghuisman](https://community.wolfram.com/u/sghuisman)\
**Post date:** [October 28, 2015, 4:17pm UTC](https://community.wolfram.com/t/generating-functions/7053/6 "2015-10-28T16:17:26Z")

</div>

Please have a look at `GeneratingFunction`, `FindGeneratingFunction`, `FindSequenceFunction`, `SeriesCoefficient` and `Series` there are a plethora of examples!

---

<div class="post-metadata">

**Author:** ![zevskaban](https://avatars.discourse-cdn.com/v4/letter/z/ccd318/32.png) [@zevskaban](https://community.wolfram.com/u/zevskaban)\
**Post date:** [October 28, 2015, 4:42pm UTC](https://community.wolfram.com/t/generating-functions/7053/7 "2015-10-28T16:42:52Z")

</div>

Thx for help.  
I got it now! c:

---

<div class="post-metadata">

**Author:** ![sghuisman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sghuisman/32/27850_2.png) [@sghuisman](https://community.wolfram.com/u/sghuisman)\
**Post date:** [October 28, 2015, 5:48pm UTC](https://community.wolfram.com/t/generating-functions/7053/8 "2015-10-28T17:48:35Z")

</div>

Perhaps you can share your findings along with an example. Such as to make this discussion useful for future reference.

---

<div class="post-metadata">

**Author:** ![henrikschachner](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/henrikschachner/32/32119_2.png) [@henrikschachner](https://community.wolfram.com/u/henrikschachner)\
**Post date:** [October 28, 2015, 8:06pm UTC](https://community.wolfram.com/t/generating-functions/7053/9 "2015-10-28T20:06:57Z")

</div>

Hi Roman,

the sequence which generates the function is just the Taylor serie. The general formula for the coefficients are the well known terms \left.\frac{1}{n!}\frac{\partial}{\partial x} g(x)\right|\_{x=0}. You can calculate a bunch of those terms and than use `FindSequenceFunction` to find in a somewhat empirical way a more specific formula:

```
g[t_] := Exp[-2*t^2]
gterms = Table[(D[g[t], {t, n}]/n!) /. t -> 0, {n, 0, 20}]
(* or likewise: *)
gterms = Table[SeriesCoefficient[g[t], {t, 0, n}], {n, 0, 20}]
(* find a specific formula for the terms: *)
FindSequenceFunction[gterms, n]

```

resulting in:

![tn.png](https://global.discourse-cdn.com/wolfram/original/3X/8/3/8324d8518356f762f81f1b8b9261f2a718a36efc.png)

Isn’t Mathematica just great?!? Regards – Henrik

---

<div class="post-metadata">

**Author:** ![dana01](https://avatars.discourse-cdn.com/v4/letter/d/77aa72/32.png) [@dana01](https://community.wolfram.com/u/dana01)\
**Post date:** [October 29, 2015, 2:35am UTC](https://community.wolfram.com/t/generating-functions/7053/10 "2015-10-29T02:35:56Z")

</div>

> … How I can find using wolfram generate term of sequence

Hi. There is also CoefficientList … (which eliminates the table command) :\>)

```
CoefficientList[Series[g[t],{t,0,20}],t]
{1,0,-2,0,2,0,-(4/3),0,2/3,... etc}

```
