# Items tagged with recurrencerecurrence Tagged Items Feed

### Procedure for Array using recursion....

February 17 2014
0 6

I'm trying to create and populate the Array A with a sequence of lower triangular matrices based on the following relation:

A[k+1][i,j] = a (1+k) A[k][i,j] + b ((1+j) A[k][i-1,j] - j A[k][i-1,j-1])

The rows and columns of each matrix are given by i and j; a and b are scalars. The structure of A is not important provided a matrix can be accessed for a given k. The highest k value will not be more than about 100.

The starting matrix for k=1 is

[-1  0]
[ 1 -1]

Any guidance on where to start with setting up the appropriate procedure would be greatly appreciated.

Thanks.

### concerning the identify command / master theorem...

February 05 2014
1 5

Greetings to all.

At the following Math.Stackexchange Discussion a certain constant was computed in relation to a Master Theorem Type recurrence being solved. This prompted me to try to identify it by the use of the eponymous command. What follows is the content of the Maple session. You may want to read the post in order to get an understanding of what the constant means and how its exact value is calculated.

> fsolve(2/2^a+1/4^a=1, a);
1.271553303

> identify(%);
1.271553303

> identify(%,all);
1/2    1/2
2 2      3
arcsech(------ + ---- - 1/6 Zeta(5))
7       6

> evalf(log[2](1+sqrt(2)));
1.271553303


My questions/observations are:

• Why does the algorithm fail to spot as simple a constant as the one above or am I just not invoking it correctly?
• If that last formula were true the author of this code would certainly win a prize for calculating a closed form expression for an odd integer zeta function value! (To be fair here I did notice that the spurious identification disappears when the number of working digits is increased and I do understand that the identification depends critically on the number of digits.)

In concluding I would like to say, why the complicated formula and not the simple one? Let me congratulate you just the same on providing this very useful command. I have worked on pandigital approximations which are slightly related and I understand that adding an operation like the logarithm to an integer base up to some max base value can dramatically increase the search space and may not always be feasible.

Best regards,

Marko Riedel

### How do I use a recursion procedure to solve this p...

November 26 2013
2 2

C(n,k)=((2*(k-2-n))/(k*(k-1)))*C(n,k-2)
if n in {even} then C(n,0)=((-1)^(n/2))*(factorial(n)/factorial(n/2)) and C(n,1)=0
if n in {odd} then C(n,0)=0 and C(n,1)=(2*(-1)^((n-1)/2))*(factorial(n)/factorial((n-1)/2))

i've been trying for hours to get a procedure involving this to work :(

Thanks

### convert recurrence relation into matrix form...

October 08 2013
0 2

Having a recurrence relation of the form:

f(n)*c_{n+1} + g(n)*c_n + h(n)*c_{n-1}=0

with coefficient functions f,g,h is it possible to convert this into a matrix of dimension N+1

thus if the sequences c_n are the coefficients of a series sum_{n=0}^{infinity} c_n x^n I'm only interested up to order N of the series

e.g. N=2

n=0: f(0)*c_{1} + g(0)*c_0 =0

n=1: f(1)*c_{2} + g(1)*c_1 + h(1)*c_{0}=0

n=2: g(2)*c_2 + h(2)*c_{1}=0

### general solution...

August 14 2013
1 4

I initialise a matrix by recurrence, the dimension of the matrix and its elements depend on the (N1,N2) given. then, I create a vector of the same length of the matrix, its dimension is also defined by (N1,N2). then, I would like to linearsolve the matrix by the vector for a general solution with (N1,N2) as parameters. would this be possible?

here is the definition of the matrix and the vector:

-------------------------------------t:...

### solving differential equation but only returning r...

July 21 2013
1 17

Is it possible when solving a differential equation to get the corresponding recurrence relation of the series expansion instead of the actual solution?

e.g.

ode:=y''=omega^2*y(x)

the solution is obviously exp(\pm omega*x)

But I want

a_(n+2) = omega^2/(n+1)(n+2) * a_n

or something like that

### Solving a system of recurrence relations...

July 08 2013
1 1

Hi,

I'm using Maple 14 and I'm trying to solve a system of recurrence relations with initial conditions (a Vector Autoregressive model). The system is

const:=Vector[column]([0.009421681, -0.0005441856]):
lagY:=Vector[column]([0.796519372, 0.0179147112]):
lagZ:=Vector[column]([0.133049059, 0.5240695764]):
A:=<<const>|<lagY>|<lagZ>>;

eq1:=y(t) = A[1, 1] + A[1, 2]*y(t - 1) + A[1, 3]*z(t - 1);
eq2:=z(t) = A[2, 1] + A[2, 2]*y(t - 1) + A[2, 3]*z(t - 1);

### Solve recurrence equations...

June 28 2013
3 12

Hello,

I've got a recurrence equation system like:

fn:={f(x)=sum(f(k)*f(x-k-1),k=0..x-1),f(0)=1}

appearently

rsolve(fn,f(k))

doesn't work.

Is there a way to solve this with maple?

Actually I also would like to solve this step by step, by hand. Could you refer me to something that could help me, solve my problem?

### Recurrence relation for loop...

September 23 2012
0 4

Thanks a lot

### Around Pascal's triangle...

September 13 2012
0 2

Let N(1, 1)=1 and N(1,k)=0 if k<>1. Let N(s+1,k) = N(s,k) + N(s,k-1) + N(s,k+1).
Acting in such a way, we obtain  the triangle
1
1,1,1
1,2,3,2,1
1,3,6,7,6,3,1
.................,
where only the nonzero terms are shown.
What is the explicit formula for N(s,k)? How to find it with Maple?

### Tidying up a messy set of Proc and loops. (Recurre...

January 07 2012
1 2

Hello everyone

I want to check whether a recurrence relation produces integers. What I have written is rather messy, I ideally would like some kind of Proc where I can just put in the recurrence relation, the initial conditions and the number of terms I would like to check. Then get a result out which tells me whether the terms in the sequence are all integer.

I have written the following (which tells me what I want to know but in a crude way)

### quick way to test for integer sequences produced b...

January 06 2012
1 3

I have a 3rd order nonlinear recurrence relation and I would like to produce the associated sequence.

Here is the relation x[n+2]:=(((x[n+1]*x[n])^2+x[n]^2+x[n+1]^3))/x[n-1]. At the moment the method I am using (a standard do command) is very computationally heavy when I want lots of iterates. I was wondering if there were faster loops, or procs.

Also I would like some kind of way to check if all the terms are integers, maybe some kind of summation where an...

### How to convert this formula to generating function...

August 20 2011
0 0

(i^2+i*alpha+i*beta+i)*Q(n)+((-x*alpha-x*beta-2*x+beta-alpha)*n-x*alpha-x*beta-2*x+beta-alpha)*Q(n+1)+((1-x^2)*n^2+(-3*x^2+3)*n-2*x^2+2)*Q(n+2) = 0

After using diffeqtorec, there is n in coefficient, if multiply x^n/n! to all terms, i can not convert some to exponential function due to n^2, n and the difference of outer coefficient n not greater than n+2 in Q(n+2)

as i do not know the initial condition of above formula, differential equation is no use.

### Parking Lots and Generating Functions...

June 29 2011 Maple
8
1

The June edition of the IBM Ponder This website poses the following puzzle:

Assume that cars have a length of two units and that they are parked along the circumference of a circle whose length is 100 units, which is marked as 100 segments, each one exactly one unit long.

A car can park on any two adjacent free segments (i.e., it does not need any extra maneuvering space).

### how to get a general solution from recurrence rela...

March 22 2011
0 2

there are several method to provide solve recurrence problems  in Maple,such as define ,rsolve,etc.here ,i meet a problem.

i want to compute the function Gamma(n), if n is a posint ,only given recurrence relation f(z)=(z-1)f(z-1),initial condition,f(0)=1,then i can get the true result with rsolve,of couse,i had made  an ansatz that z is n::posint.yet ,z is not posint? To suppose z  equal to 5/2, (2*n+1)/2 more generally,how can get the answer((2n-1)!!*Pi/2^n).

 1 2 Page 1 of 2
﻿