New in Wolfram Mathematica 7: Discrete Calculus  previous | next 
Find Symbolic Generating Functions
Find symbolic ordinary generating functions.
In[1]:=

Click for copyable input
problems = {HoldForm[GeneratingFunction[UnitStep[n + 1/2], n, z]], 

   HoldForm[GeneratingFunction[n^2 + 2, n, z]], 

   HoldForm[GeneratingFunction[1/(2 n + 1), n, z]], 

   HoldForm[GeneratingFunction[Sin[a n], n, z]], 

   HoldForm[GeneratingFunction[ChebyshevU[n, a], n, z]], 

   HoldForm[GeneratingFunction[BernoulliB[n]/n!, n, z]], 

   HoldForm[GeneratingFunction[a^n Sin[n], n, z]], 

   HoldForm[GeneratingFunction[Mod[n, 7], n, z]], 

   HoldForm[GeneratingFunction[f[n + 1], n, z]], 

   HoldForm[GeneratingFunction[Binomial[m, n], {m, n}, {u, v}]], 

   HoldForm[GeneratingFunction[m/(n + 1), {m, n}, {u, v}]]};
In[2]:=

Click for copyable input
FormulaGallery[forms_List] := 

 Module[{vals = ParallelMap[ReleaseHold, forms]}, 

  Text@TraditionalForm@

    Grid[Table[{forms[[i]], "==", vals[[i]]}, {i, Length[forms]}], 

     Dividers -> {{True, False, False, True}, All}, 

     Alignment -> {{Right, Center, Left}, Baseline}, 

     Background -> LightYellow, Spacings -> {{4, {}, 4}, 1}]]
In[3]:=

Click for copyable input
FormulaGallery[problems]
Out[3]=