Items tagged with sequence sequence Tagged Items Feed

I am trying to find a way to take the rows of a matrix and put them in a sequence.  For example if i have the matrix 


I want to rewrite it as S:= {111222333}.  

Sorry if this is not clear.  I know how to create a sequence, but I want to be able to use the Matrix and output a sequence without manually inputing the numbers.  

Thank you in advance for your help.  

RandomCompositions:= proc(n::posint, k::posint)
Compositions:= [seq(C-~1, C= combinat:-composition(n+k, k))],
Rand:= rand(1..nops(Compositions))
()-> Compositions[Rand()]
end proc:

R:= RandomCompositions(9,6):
n:= 2^13:
S:= 'R()' $ n:


I want to compile statistics each number in a sequence cannot  occur  over twice.

The sequences that do not fit the rule above must be ommitted.

The statistic is  Fermi-Dirac statistics.

confused the Bose-Einstein condensation and Fermi-Dirac statistics.

But the theory is right.


Is that possible to get the differences between two sequences directly? (instead of using a list)

I don't quit understand why the second method would collapse the 0s into just a single value. It's not a set.




I have a rank 1 array M of 1000 values.

I want to apply a function f on each value of M and its location giving,

[f(1,M[1]), f(2,M[2]), ... , f(1000,M[1000])]

is it possible to get this using map or map2 or map[n] or maptype (without using seq since its slowing down computation).

inotherwords can i access the member location inside a map evaluation?

Hello Hello everybody 
   I have to solve the following differential equation numerically 




mb:=765 : mp:=587 : Ib:=76.3*10^3 : Ip:=7.3*10^3 : l:=0.92 : d:=10: F:=490: omega:=0.43 :


1352*(diff(diff(x(t), t), t))+587*(10*cos(theta(t))+.92*cos(alpha(t)+theta(t)))*(diff(diff(theta(t), t), t))+540.04*cos(alpha(t)+theta(t))*(diff(diff(alpha(t), t), t))+5870*(diff(theta(t), t))^2*sin(theta(t))+540.04*(diff(theta(t), t)+diff(alpha(t), t))^2*sin(alpha(t)+theta(t))-490*sin(.43*t) = 0



1352*(diff(diff(z(t), t), t))-5870*(sin(alpha(t)+theta(t))+sin(theta(t)))*(diff(diff(theta(t), t), t))-540.04*sin(alpha(t)+theta(t))*(diff(diff(alpha(t), t), t))+5870*(diff(theta(t), t))^2*cos(theta(t))+540.04*(diff(theta(t), t)+diff(alpha(t), t))^2*cos(alpha(t)+theta(t))+13263.12-490*sin(.43*t) = 0



587*(10*cos(theta(t))+.92*cos(alpha(t)+theta(t)))*(diff(diff(x(t), t), t))-587*(.92*sin(alpha(t)+theta(t))+10*sin(theta(t)))*(diff(diff(z(t), t), t))+(142796.8368+10800.80*cos(alpha(t)))*(diff(diff(theta(t), t), t))+[7796.8368+5400.40*cos(alpha(t))]*(diff(diff(alpha(t), t), t))-587*sin(alpha(t))*(9.20*(diff(alpha(t), t))^2-9.20*(diff(theta(t), t)+diff(alpha(t), t))^2)+5297.7924*sin(alpha(t)+theta(t))+57584.70*sin(theta(t)) = 0



540.04*cos(alpha(t)+theta(t))*(diff(diff(x(t), t), t))-540.04*sin(alpha(t)+theta(t))*(diff(diff(z(t), t), t))+(7796.8368+5400.40*cos(alpha(t)))*(diff(diff(theta(t), t), t))+7796.8368*(diff(diff(alpha(t), t), t))-5297.7924*sin(alpha(t)+theta(t))+5400.40*(diff(theta(t), t))^2*sin(alpha(t)) = 0


CI:= x(0)=0,z(0)=0,theta(0)=0,alpha(0)=0,D(x)(0)=0,D(alpha)(0)=0,D(z)(0)=0,D(theta)(0)=0;

x(0) = 0, z(0) = 0, theta(0) = 0, alpha(0) = 0, (D(x))(0) = 0, (D(alpha))(0) = 0, (D(z))(0) = 0, (D(theta))(0) = 0


solution:=dsolve([eq1,eq2,eq3,eq4, CI],numeric);

Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]




I don't know why it says : Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]


Help pleaase!

thank you !!!

Download systé


the meaning of []...

May 12 2014 taro 100

Hello Those who are in Mapleprimes.


I want to know the meaning of [].

That is,



What were returned was 


This result is the same as that obtained from



What kind of meaning does a[] have?

I want to know the logic of this expression.

Can I ask you about this?

Thank you in advance.


taro yamada 






I'm trying to run two statement sequences, one after the other, numerous times. I have the statement sequences:


>for j from 1 to N do



>end do:


>for j from 1 to N do

>if S[j]>99 then S[j]:=0

>end if:

>end do:



I can manage to run one of them multiple times, but when I try to encompass both of them within my 


>for counter from initial to final do statementsequence

end do:


it doesn't seem to work.


Thanks in advance

Is it possible to display each element of a sequence on a new line?

The default behaviour, obviously, is to display each element on the same line separated by commas, and wrapping to a new line as required by screen space. This is somewhat unsightly when the elements of the sequence contain long equations or expressions, and impacts readability because the commas don't stand out as effective separators between elements.

For example:

B := b=2;

C := c=3;

A := B,C;


b=2, c=3


Is there a way to display each element on a new line?

For example:





Is there another data type or a simple expression that could achieve this effect?

The following limit does not return a value. Then the evalf gives a wrong answer.

The answer should be "undefined" or -infinity .. infinity.

limit(exp(n)/(-1)^n, n = infinity) assuming n::posint; evalf(%);

                       /exp(n)              \
                  limit|------, n = infinity|
                       |    n               |
                       \(-1)                /


The same happens if you delete the assumption.


A similar problem occurs with

limit(sin(Pi/2+2*Pi*n), n = infinity) assuming n::posint;
                            -1 .. 1
without the assumption this would be appropriate.

How to find 2013th term in the sequence 

1, 2, 2, 3, 3, 3, 4, 4, 4, 4, ...?

in which the n-th positive integer appears n times. 

I don't know how to start.

Need help with starting this question. Thanks!

If a sequence is defined by X0=0, X1=1, X2=2 and Xn=n(Xn-3+Xn-2+Xn-1), n>=3

How many digits will X2013 have?

I'm having problem dealing with this question on Maple and would appreciate any help possible.

If f(x) = x/2, if x is even
   f(x) = 3x-1, if x is odd

which sequence will 2013^1102 fall in


Dear Maple forum,


given A, B real numbers,

and after defining the recurrent sequence


x(0) = A

x(n) = 0.5* x(n-1)^3 + B


I would like to see a graphic of x(n) on the plane x(n) - n.

how could I implement in maple 16?


thank you for your help.



I have this sequence:

 D[n] = (Sum((n-k)/(k+1),k = 0 .. n-1)-ln(n!))/n;

How can I put  this in maple, assess if it converges or not and if it is possible, calculate the limit to infinity.



I'm very new to Maple and can't figure out how to do this:

I have these possibilities:

for 1 - [1],[2],[3]

for 2 - [1,2],[2,1],[1,3],[3,1],[2,3],[3,2]

for 3 - [1,2,3],[2,3,1],[3,1,2],[3,2,1],[2,1,3],[1,3,2]

and I want to find all the possible combinations when they are in, say, the order of [3,2,1]






1 2 3 Page 1 of 3