Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to convert recurrence into generating function?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125144] Re: How to convert recurrence into generating function?
  • From: Dana DeLouis <dana01 at me.com>
  • Date: Fri, 24 Feb 2012 00:58:18 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

> there is an Mexiner recurrence equation...

> ... +n*P(n-1)/(-1+c) = 0 .....

Hi.  I don't have a solution, but just some ideas.
Just guessing on your equation, but a recurrence equation that uses P(n-1) is usually written as P[n-1].
It also appears you used Set (=) vs Equal (==).
Here's just a simple example where the current value at n is equal to 
the previous value, plus twice the value of the second previous value.
I've included initial values as well.  (Almost similar to Fibonacci[n] )
Hopefully, these will give you some ideas to work with.

equ={ p[n]==p[n-1]+2 p[n-2], p[1]==1, p[2]==1};

Then...

Flatten[FullSimplify[RSolve[equ, p[n], n]]]

{p[n] -> (1/3)*(-(-1)^n + 2^n)}

So, the recurrence equation is:

equ = (1/3)*(-(-1)^n + 2^n); 

A generation function...

gf=GeneratingFunction[equ,n,x]//FullSimplify

-(x/(-1+x+2 x^2))

Show ....

Series[gf,{x,0,10}] //Normal

x+x^2+3 x^3+5 x^4+11 x^5+21 x^6+43 x^7+85 x^8+171 x^9+341 x^10

Easier to view as list...

CoefficientList[%,x]
{0,1,1,3,5,11,21,43, 85, 171, 341}

341 does equal 2*85 + 171

= = = = = = = = = = = = =
HTH  :>)
Dana DeLouis
Mac + Math 8.0
= = = = = = = = = = = = =




On Feb 19, 6:32 am, Lee Martin <galeom... at gmail.com> wrote:
> there is an Mexiner recurrence equation,
> but both generatingfunction and convert not convert into generating
> function as stated in paper.
> 
> How to recurrence into generating function correctly?
> 
> GeneratingFunction[c*(n+beta)*P(n+1)/(-1+c)+(c*(x+beta)/(1-c)-x)*P(n)
> +n*P(n-1)/(-1+c) = 0,n,z]
> GeneratingFunction[c*(n+beta)*P(n+1)/(-1+c)+(c*(x+beta)/(1-c)-x)*P(n)
> +n*P(n-1)/(-1+c),n,z]
> 
> Expand((c*(n+beta)*P[n+1]/(-1+c)+(c*(x+beta)/(1-c)-x)*P[n]+n*P[n-1]/
> (-1+c))*z^n/n!)
> 
> Convert[sum[z^n*c*P[n+1]*n/(n!*(-1+c))+z^n*c*P[n+1]*beta/(n!*(-1+c))
> +z^n*P[n]*c*x/(n!*(1-c))+z^n*P[n]*c*beta/(n!*(1-c))-z^n*P[n]*x/n!
> +z^n*n*P[n-1]/(n!*(-1+c)),{n,0,infinity}],z]
> Convert[sum[(c*(n+beta)*P[n+1]/(-1+c)+(c*(x+beta)/(1-c)-x)*P[n]
> +n*P[n-1]/(-1+c))*z^n/n!,{n,0,infinity}],z]





  • Prev by Date: Re: How best to implement a hash table in Mathematica
  • Next by Date: Re: Executing a Notebook and saving the modified Notebook - all without the GUI
  • Previous by thread: How to convert recurrence into generating function?
  • Next by thread: NProbability