## How do I produce a sequence defined by a linear re...

In Mathematica, there is a command "LinearRecurrence" that lists a sequence generated by a linear recurrence.
For example,
LinearRecurrence[{-3, 1}, {7, 2}, 10]
will produce the first ten numbers in the sequence defined by a0=7, a1=2; a_n = -3 an-1 + an-2.

Is there anything similar in Maple?
If not, what would be the easiest way to do the same?

UPDATE: Two answers show how to do this example with rsolve, but it seems that this solution does not help in general for recurrence of high order.

Thank you.

## How do I displaying recurring decimals...

I have looked everywhere for help on how to format decimals to indicate they are recurring; or there is a set of numbers that is recurring. Normal notation would show a point above the the appropriate digits that follow the decimal point to indicate recurrence.

I'm sure it is simple to do but I cannot find the help that I need from the Maple help.

Regards, DLW

## Second-Order Difference Equation...

find x852 given that

x0=0.250

x1=2.00

xn=(1/9)*sqrt(7+xn-1) /xn-2

I don't know how to solve this problem.

Thanks a lot

## Solving nonlinear recurrence equation...

How to solve following recurrence equation:

a(0)=2;

a(n+1)=a(n)+a(n)^2

I tried,but it doesn't work.

How to find the sequence an ?

Maple_worsheet.mw

Mariusz Iwaniuk

## Solving Recurrence Relations...

I'm trying to solve a recurrence relation by generating terms and looking for a pattern.  I've learned that i can't stop

Maple's autosimplification process and the best I can do is use Parse from the InertForm package.  The hand drawn picture below is what I'm trying to replicate.  I know I can use rsolve but I'm trying to do the steps I would with pencil and paper.

## Why doesn't it work correctly?...

How to  compute the recurrence relation and I find the problem when the summation of U because appear noise term self-canceling and I can not find the nth component of U?Mixed_volterra_-Fredholm_(278)_Ex(8.17).mw

 >
 >
 >
 >
 >

thank you for helping:)

## Samuelson-Hicks Model...

Hello,

I want to solve and plot a multitime recurrence of the Samuelson Hicks Model (http://www.mathem.pub.ro/proc/bsgp-22/K22-gh-A84.pdf).

Feel free to share any tips that could help.

Thank you.

## Procedure for Array using recursion....

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...

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...

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...

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...

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 a system of recurrence relations...

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...

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?