## The integer solutions of a linear inequality syste...

Dear friends, I encounter the following problem. Let k and i be two given positive integers such that k>=2i>=4. How to find all nonnegative integers tuples (x_1, x_2, ..., x_i) such that k-2i<=x_1+2x_2+...+ix_i<=k-i? The buildin command "isolve" seems not work. Thanks.

## MRB Constant W

 (1)

What are the quotients  ot the  continued fration of the sum of

Here are the  quotients  of some partial sums.

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

 (12)

 (13)

 (14)

Here are the quotients of the  continued fration  of the sum.

 (15)

With the exception of the leading 0, that is close to the integer squence of pi.

 (16)

The exponents of 2 that sum the numerator and denominator, in the following way, of that multiple of pi give rise to the integer sequences {0,1,2,3,8,16},numbers such that floor[a(n)^2 / 7] is a square, and {0,2,3,4,8,16},{0,3} union powers of 2.

 (17)

We can do the same thing for the first 20 quotients giving rise to the integer sequences {0,1,2,5,6,8,10,13,17,19,22,23,24,28,31} and {0,4,6,9,12, 14,15,16,18,22, 23,24,28,31}. What can be said of these sequences?

 (18)

 (19)

 (20)

## Let a sequence( an ) defined by an=1,3,6,12,33,51...

Let a sequence( an  ) defined by an=1,3,6,12,33,51,...and n=1,2,3,.... Find formula an?

## Input integer via Textbox...

HI,

I want to create a Textbox which will be opened in the beginning of a Maple code. In this Textbox I want to write an integer, which will be used for a following calculation.

> restart; with(Maplets[Elements]);
print(output redirected...); # input placeholder
> maplet := Maplet([["Insert Text", BoxCell(TextBox['IB1'](1 .. 10))], [Button("OK", Shutdown(['IB1'])), Button("Cancel", Shutdown())]]);

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

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

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

## 2d Math - Numerical integer with index...

HI,

at first I have to admit, that I'm totaly new to maple and have only few experience with the programm.

That's the problem. I've got an old maple-code which I want to rewrite in the 2d-Math-syntax. In the code there are a lot of variables of the type "numerical integer" with a form like

"rho_a"

"N_A"

....

--> with index in the name

It's a code for a physical-/chemical- process so the...

## trunc each element in matrix...

How can i trunc (find closest integer) each element in a matrix ?

This is my matrix equation:

for n to 20 do 'CD'^n, 'F' = evalf(C[1].D[1]^n.F[1]) end do

And i want to show  "trunced" results

## Integer Computations...

Hi,

I am new to Maple, so sorry for asking this TRIVIAL question but I got quite frustrated after so much time unsuccessfully trying to figure out how to perform integer computations.

Lets take the simple example below:

3k - 5 = 0

I wanna get k=1 not 5/3

Isolve doesn’t work  for this as I would like. Introduced assumptions re ignored:

Solve(3*k -5=0, k, useassumptions) assuming k :: nonnegint

## Return only the base angle?...

If I have

F = x + 2π_Z1~

Is there a function/operator I can apply to F which returns only x, discarding 2π_Z1~?  That is, I want to return only the base angle, and dump the added integer multiple of 2π term.

## why does evalc give csgn?...

Hi,

I am trying to simplify the expression s as given below. (I am not sure why it comes up with all the vector caclulus notation in it but it should display okay when you enter it)

Because of the presence of the exponential imaginary fucntions I thought evalc might be useful but when I use it I get a huge expression with csgn appearing in it. To my knowledge csgn appears when assumptions are not correctly specified - is this so? I can't see any assumption...

## summation (not addition) over even/odd pos integer...

Maple evaluates

> sum(1/z^2, z = 1 .. infinity)

to (1/6)*Pi^2. What do I do when sumation is over all even positive integers? Is there any  closed-form symbolic formula for this case?

Above is the minimal example. What I need is to compute

> sum(2*binomial(m-1, k-1)*binomial(n-1, k-1)/binomial(m+n, m), k = 1 .. infinity)

where k belongs to a set of only even positive integers, not any posint. The second expression evaluates to 2*m*n/((m+n-1...

## cardinal constraint in a {-1,0,1} Linear Program...

Test.mw

If I use a binary {0,1} linear program the cardinal constraint ie control the
number of 1's (long positions in portfolio) works beautiful. See attached worksheet.

The problem starts when I convert the problem into a constrained integer {-1,0,1}
linear problem where -1= short position, 0=no position and 1=long position.

In the first example when we add the constraint  add(w[i], i = 1 .. NC) = 4

## Linear Programming and Piecewise...

I can solve a [0,1] linear programming problem by using:

LPSolve(Ob, con, assume = binary);

I managed to solve [-1,1] linear programming problem by using the transformation
2*w[i]-1 ie   2*0-1=-1 and 2*1-1=1 as follows:

LPSolve(add(PP[i]*(2*w[i]-1), i = 1 .. NC)-add(Draw[i]*(2*w[i]-1), i = 1 .. NC), {add(w[i], i = 1 .. NC) = PS}, maximize = true, assume = binary);

Now my question is how can I solve a [-1,0,1] problem?
I tried to use:

## How to Solve this Problem? About proc and sum...

x := proc (i::integer)

return i^2;

end proc:

sum(x(m),m=1..3);

Error, invalid input: x expects its 1st argument, i, to be of type integer, but received i.

If I want to reserve the ::integer declaration, How to solve this problem. I know if there is no

 2 3 4 5 6 7 8 Last Page 4 of 23
﻿