Items tagged with integer integer Tagged Items Feed

I want to find a triangle with the vertices A(x1, y1, z1), B(x2, y2, z2), C(x3, y3, z3) knowing that the point G(1,1,1) is centroid of the triagle ABC and x1, y1, z1, x2, y2, z2, x3, y3, z3 are integer numbers, but I can not find. How do I tell Maple to do that? 

Hello, I have a set of equations, and I want to solve it over the integers (mod 13). But msolve command fails. Here is my code:

eq:={a4*a1-11, a4*a2-12, a4*a3-6, a5*a1-3, a5*a2-8, a5*a3-4, a6*a1-2, a6*a2-1, a6*a3-7};
msolve(eq,13);

It fails, but I can solve it manually. Here is a solution:

a4*a1 = 11 => a4:=1 and a1:=11

a4*a2 = 12 => a2:=12

a4*a3 = 6 => a3:=6

a5*a1 = 3 => a5:=3/11 mod 13 = 5

a5*a2 = 8 => a2:=8/5 mod 13 = 12

Fine $a_{n}$ of sequence  2 , 3 , 6 , 7 , 10 , 11 , 14 , 15,...

Hi All, I have the following procedure to compute the gcd between two integers:

Egcd := proc(a, b)
while b != 0 do
temp := b;
b := a mod b;
a := temp;
od;
return a;  
end proc;

Why does it simply return the value of a when the function was called? (i.e my statements inside the procedure do nothing

I created a triangle whose length of the medians are integral numbers. Please comment to me about my code.

> resrart:

ListTools[Categorize]:

N:=5:

L:=[]:

for x1 from -N to N do

for y1 from x1 to N do

for z1 from y1 to N do

for x2 from -N to N do

for y2 from -N to N do

In geom3d, how can i make a triangle which coordinates of the center circle circumscribed triangle are integer numbers? Please help me. Thank you.

What is the next two terms for this pattern...

1, -2, 2, -4, 0, ...

Suppose I have a matrix M, with rational entries. I need to go row by row and scale each individually by the smallest possible integer such that the entries in each row are integer-valued - anyone have an easy way to do this? It's a large matrix.

We have 1^2 + 2^2 +2^2 = 3^2; 2^2 + 3^2 + 6^2 = 7^2; 2^2 + 10^2 +11^2 = 15^2. Please write for me a command solve the equation a^2 + b^2 + c^2 = d^2, where, a, b, c, d are integer numbers, and d <=100. Thank you very much.

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.

 

with(numtheory):

f := proc (x) options operator, arrow; sum((-1)^n*(n^(1/n)-1), n = x .. infinity) end proc

proc (x) options operator, arrow; sum((-1)^n*(n^(1/n)-1), n = x .. infinity) end proc

(1)

What are the quotients  ot the  continued fration of the sum of f(1)+f(2)+f(3)+f(4)+...

Here are the  quotients  of some partial sums.

``

cfrac(evalf(sum(f(x), x = 1 .. 2)), 'quotients')

[0, 2, 1, 1, 1, 21, 10, 4, 1, 4, 8, `...`]

(2)

cfrac(evalf(sum(f(x), x = 1 .. 3)), 'quotients')

[0, 6, 1, 2, 3, 1, 1, 2, 3, 3, 24, `...`]

(3)

cfrac(evalf(sum(f(x), x = 1 .. 4)), 'quotients')

[0, 2, 1, 2, 1, 4, 2, 1, 3, 1, 1, `...`]

(4)

cfrac(evalf(sum(f(x), x = 1 .. 5)), 'quotients')

[0, 5, 1, 99, 1, 1, 1, 6, 1, 3, 1, `...`]

(5)

cfrac(evalf(sum(f(x), x = 1 .. 6)), 'quotients')

[0, 2, 1, 6, 1, 2, 1, 2, 2, 1, 1, `...`]

(6)

cfrac(evalf(sum(f(x), x = 1 .. 7)), 'quotients')

[0, 5, 1, 1, 142, 1, 1, 1, 1, 19, 1, `...`]

(7)

cfrac(evalf(sum(f(x), x = 1 .. 8)), 'quotients')

[0, 2, 1, 47, 1, 1, 1, 1, 27, 4, 1, `...`]

(8)

cfrac(evalf(sum(f(x), x = 1 .. 9)), 'quotients')

[0, 5, 5, 3, 1, 7, 1, 1, 1, 2, 1, `...`]

(9)

cfrac(evalf(sum(f(x), x = 1 .. 100)), 'quotients')

[0, 3, 1, 1, 1, 11, 2, 2, 1, 1, 4, `...`]

(10)

cfrac(evalf(sum(f(x), x = 1 .. 200)), 'quotients')

[0, 3, 1, 2, 1, 1, 1, 11, 3, 4, 6, `...`]

(11)

cfrac(evalf(sum(f(x), x = 1 .. 400)), 'quotients')

[0, 3, 1, 3, 3, 3, 1, 18, 1, 2, 1, `...`]

(12)

cfrac(evalf(sum(f(x), x = 1 .. 800)), 'quotients')

[0, 3, 1, 3, 1, 4, 16, 14, 3, 23, 2, `...`]

(13)

cfrac(evalf(sum(f(x), x = 1 .. 1600)), 'quotients')

[0, 3, 1, 4, 7, 4, 436, 1, 1, 1, 2, `...`]

(14)

``

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

cfrac(evalf(sum(f(x), x = 1 .. infinity)), 'quotients')

[0, 3, 1, 4, 1, 1, 1, 1, 1, 9, 1, `...`]

(15)

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

``evalf((65241/65251)*Pi)

3.141111191

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

evalf((2^16-2^8-2^5-2^2-2-2^0)*Pi/(2^16-2^8-2^4-2^3-2^2-2^0))

3.141111191

(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?

cfrac(evalf(sum(f(x), x = 1 .. infinity), 20), 20, 'quotients')``

[0, 3, 1, 4, 1, 1, 1, 1, 1, 9, 1, 3, 1, 2, 1, 1, 1, 5, 1, 3, 11, `...`]

(18)

evalf((1849023129/1849306543)*Pi, 20)

3.1411111913121115131

(19)

````

evalf((2^31-2^28-2^24-2^23-2^22-2^19-2^17-2^13-2^10-2^8-2^6-2^5-2^2-2-2^0)*Pi/(2^31-2^28-2^24-2^23-2^22-2^18-2^16-2^15-2^14-2^12-2^9-2^6-2^4-2^0), 20)

3.1411111913121115131

(20)

``


 

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

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.

I already found this code:

 

> 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())]]);

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)

1 2 3 4 5 6 7 Last Page 2 of 22