Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8716 > unrolled thread

Re: How to convert recurrence into generating function?

Started byDana DeLouis <dana01@me.com>
First post2012-02-24 05:59 +0000
Last post2012-02-24 05:59 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: How to convert recurrence into generating function? Dana DeLouis <dana01@me.com> - 2012-02-24 05:59 +0000

#8716 — Re: How to convert recurrence into generating function?

FromDana DeLouis <dana01@me.com>
Date2012-02-24 05:59 +0000
SubjectRe: How to convert recurrence into generating function?
Message-ID<ji7902$haj$1@smc.vnet.net>
> 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...@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]


[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web