## 35 Reputation

8 years, 102 days

## order of terms in series (algeqtoseries)...

Maple

I have a functional equation in 2 variables, and I want to write its solution(s) as (Puiseux) power series. When the order is relatively big, the output appears not in the increasing order of powers. For example, I execute

map(allvalues, algeqtoseries(P, t, u, 60, true))

and get as one of the solutions

O(t^(65/3)) + 13*t^9*(1/3) + 2*t^5*(1/3) + 115*t^15 + 37*t^13 + 5*t^7*(1/3) + 37*t^11*(1/3) + (1/3)*t^3 + 11836*t^21*(1/3) + 1193*t^19 + 1100*t^17*(1/3) [...]

What should I do in order to get the series with terms appearing in the increasing order of powers of t?

Thanks!

## Command "Generate" produces the same obj...

Maple

I need to create randomly several {1,2,3}-sequences of length 15. I execute:

> with(RandomTools):

> w:=Generate(list(posint(range = 3), 15)):

The problem is that when I close the program and then open and run it again, it always produces the same sequences.

What should I do in order to make it work really randomly? That is, to start at a "random" sequence as well?

Thanks!

## Is there a command for the sign of a per...

Maple

I produce a list of permutations with "permute".

For each produced permutation, I want to have its sign (1 for even, -1 for odd).

Is there a command for that?

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

Maple

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.

## Problem with old application ...

Maple 2015

I have downloaded and trying to run the application "Traveling Salesman Problem" by Bruno Guerrieri:

http://www.maplesoft.com/applications/view.aspx?SID=6873

However, the animations do not work properly. Instead of the animations, I get series of sets of plots. Each such set consists of four plots: one with a green edge, one with a blue edge, one with blue edges, and one with points (nodes).

I guess, it happens because of a new version of maple: the application was created in 2008 for Maple 12, and I use Maple 2015.

Could anybody, please, tell me what exactly should I change in the code so that it will work properly?

Any help will be very much appreciated.