# Find closed form expression for series expansion coefficients [duplicate]

Is there a built-in function that will find a general expression for the coefficient of the series expansion of a function?

Series will only give the explicit terms up to some order

In[14]:= Series[Exp[x],{x,0,10}]
Out[14]= 1+x+x^2/2+x^3/6+x^4/24+x^5/120+x^6/720+x^7/5040+x^8/40320+x^9/362880+x^10/3628800+O[x]^11


And GeneratingFunction works the other way:

In[15]:= GeneratingFunction[1/n!,n,x]
Out[15]= E^x


I'm looking for something like the inverse of GeneratingFunction: start with Exp[x] and get 1/n!. Does it exist?

-

## marked as duplicate by Guess who it is.♦May 9 '13 at 5:42

Also FindSequenceFunction[] isn't very clever ... at least in V8. Has it been improved in v9? –  belisarius Mar 20 '13 at 2:47
–  Jens Mar 20 '13 at 3:25
@belisarius. V9.0.1 docs indicate FindSequenceFunction has not been modified since its introduction into V7. –  m_goldberg Mar 20 '13 at 8:14

In this case you can use SeriesCoefficient

SeriesCoefficient[Exp[x], {x, 0, n}]

-
Thanks! I can't believe I spent 20 minutes looking and I didn't see this ... For some reason I was convinced it's only for SeriesCoefficient[Series[...], ...]. –  Szabolcs Mar 20 '13 at 2:49

There is another approach that sometimes works better (gives closed-form expressions rather than recurrence relations):

In[1]:= InverseFourierTransform[(-I k)^n FourierTransform[1/(1 + x^2)^Log[2], x, k] , k, x]
Out[1]= (2^(-1 + n - 1/2 Log[1/x^2])
Abs[x]^-Log[2] ((-I)^
n ((1 + n) x Gamma[(1 + n)/2] Gamma[
n/2 + Log[2]] Hypergeometric2F1[(1 + n)/2, n/2 + Log[2], 1/
2, -x^2] (n + Log[4]) -
2 I Gamma[1 + n/2] Gamma[
1/2 (1 + n + Log[4])] ((1 + x^2) Hypergeometric2F1[(2 + n)/
2, 1/2 (1 + n + Log[4]), -(1/2), -x^2] -
Hypergeometric2F1[(2 + n)/2, 1/2 (1 + n + Log[4]), 1/
2, -x^2] (1 + x^2 (3 + 2 n + Log[4])))) +
I^n ((1 + n) x Gamma[(1 + n)/2] Gamma[
n/2 + Log[2]] Hypergeometric2F1[(1 + n)/2, n/2 + Log[2], 1/
2, -x^2] (n + Log[4]) +
2 I Gamma[1 + n/2] Gamma[
1/2 (1 + n + Log[4])] ((1 + x^2) Hypergeometric2F1[(2 + n)/
2, 1/2 (1 + n + Log[4]), -(1/2), -x^2] -
Hypergeometric2F1[(2 + n)/2, 1/2 (1 + n + Log[4]), 1/
2, -x^2] (1 + x^2 (3 + 2 n + Log[4]))))))/((1 + n)
Sqrt[Pi] x Gamma[Log[2]] (n + Log[4]))


It also can be used to find repeated anti-derivatives.

-