Items tagged with integer

Hello,

I am working on a Dirichlet breakdown of primes. I need a way to check if a number is part of anothers number factorization.

Example: 30 = 2*3*5.

2 is therefore part of the ifactor of 30. 4 and 7 are not.
How do I check if, for instance, 7 is part of de factorization of 390?

Thanks in advance.

I'd like to solve 178x + 312y = 14

I tried:

a=178,b=312:
c=igcdex(a,b,'e','f');
14/c*e=x;14/c*f=y;

But Maple wouldn't solve this, so I did

c=igcdex(178,312,'e','f');
14/c*e=x;14/c*f=y;

This gave x = 145 en y = -103, while according to the answers it should be x = -49 en y = 28.

145*178-103*312 is NOT 14, so something does indeed go wrong.

 

Can Maple solve this even better? Like in one go, with 178,312,x,y and 14 in one argument?

 

 

I am having trouble with understanding how to use piecewise to define a function f such that

f(x) = 1 whenever the VALUE of x is an integer (thus f((2^(0.5) - 1.0)*(2^(0.5) + 1.0)) = 1).

f(x) = 0 otherwise.

 

A prime producing polynomial.

 

Observations on the trinomial n2 + n + 41.

 

by Matt C. Anderson

 

September 3, 2016

 

The story so far

 

We assume that n is an integer.  We focus our attention on the polynomial n^2 + n + 41.

 

Furthur, we analyze the behavior of the factorization of integers of the form

 

h(n) = n2 + n + 41                                          (expression 1)

 

where n is a non-negative integer.  It was shown by Legendre, in 1798 that if 0 ≤ n < 40 then h(n) is a prime number.

 

Certain patterns become evident when considering points (a,n) where

 

h(n) ≡ 0 mod a.                                             (expression 2)

 

The collection of all such point produces what we are calling a "graph of discrete divisors" due to certain self-similar features.  From experimental data we find that the integer points in this bifurcation graph lie on a collection of parabolic curves indexed by pairs of relatively prime integers.  The expression for the middle parabolas is –

 

p(r,c) = (c*x – r*y)2 – r*(c*x – r*y) – x + 41*r2.           (expression 3)

 

The restrictions are that 0<r<c and gcd(r,c) = 1 and all four of r,c,x, and y are integers.

 

Each such pair (r,c) yields (again determined experimentally and by observation of calculations) an integer polynomial a*z2 + b*z + c, and the quartic h(a*z2 + b*z + c) then factors non-trivially over the integers into two quadratic expressions.  We call this our "parabola conjecture".  Certain symmetries in the bifurcation graph are due to elementary relationships between pairs of co-prime integers.  For instance if m<n are co-prime integers, then there is an observable relationship between the parabola it determines that that formed from (n-m, n).

 

We conjecture that all composite values of h(n) arise by substituting integer values of z into h(a*z2 + b*z + c), where this quartic factors algebraically over Z for a*z2 + b*z + c a quadratic polynomial determined by a pair of relatively prime integers.  We name this our "no stray points conjecture" because all the points in the bifurcation graph appear to lie on a parabola.

 

We further conjecture that the minimum x-values for parabolas corresponding to (r, c) with gcd(r, c) = 1 are equal for fixed n.  Further, these minimum x-values line up at 163*c^2/4 where c = 2, 3, 4, ...  The numerical evidence seems to support this.  This is called our "parabolas line up" conjecture.

 

The notation gcd(r, c) used above is defined here.  The greatest common devisor of two integers is the smallest whole number that divides both of those integers.

 

Theorem 1 - Consider h(n) with n a non negative integer. 

h(n) never has a factor less than 41.

 

We prove Theorem 1 with a modular construction.  We make a residue table with all the prime factors less than 41.  The fundamental theorem of arithmetic states that any integer greater than one is either a prime number, or can be written as a unique product of prime numbers (ignoring the order).  So if h(n) never has a prime factor less than 41, then by extension it never has an integer factor less than 41.

 

For example, to determine that h(n) is never divisible by 2, note the first column of the residue table.  If n is even, then h(n) is odd.  Similarly, if n is odd then h(n) is also odd.  In either case, h(n) does not have factorization by 2.

 

Also, for divisibility by 3, there are 3 cases to check.  They are n = 0, 1, and 2 mod 3. h(0) mod 3 is 2.  h(1) mod 3 is 1. and h(2) mod 3 is 2.  Due to these three cases, h(n) is never divisible by 3.  This is the second column of the residue table.

 

The number 0 is first found in the residue table for the cases h(0) mod 41 and h(40) mod 41.  This means that if n is congruent to 0 mod 41 then h(n) will be divisible by 41.  Similarly, if n is congruent to 40 mod 41 then h(n) is also divisible by 41.

After the residue table, we observe a bifurcation graph which has points when h(y) mod x is divisible by x.  The points (x,y) can be seen on the bifurcation graph.

 

< insert residue table here >

 

Thus we have shown that h(n) never has a factor less than 41.

 

Theorem 2

 

Since h(a) = a^2 + a + 41, we want to show that h(a) = h( -a -1).

 

Proof of Theorem 2

Because h(a) = a*(a+1) + 41,

Now h(-a -1) = (-a -1)*(-a -1 +1) + 41.

So h(-a -1) = (-a -1)*(-a) +41,

And h(-a -1) = h(a).

Which was what we wanted.

End of proof of theorem 2.

 

Corrolary 1

Further, if h(b) mod c ≡ = then h(c –b -1) mod c ≡ 0.

 

We can observe interesting patterns in the “graph of discrete divisors” on a following page.

 

This sequence has a special name does anyone know what it is? i mean id look it up on oeis but unfortunately the asthetics of their presentation dont meet my strict standards, so yes i did work out an expression for it but if anyone knows the easiest in a singular expression.. very helpful right now.

 

1, 1, 2, 2, 3, 3, 4, 4, 5, 5

Hello, I run Maple to solve Binary Integer Programming problem which contain about 1340 constraint and its goal to maximize the objective function.

At first, it's running for 2 hours and said that the iteration limit was reached. So I try to add 'iterationlimit' at LPSolve opts and set it to 10000, but after 3 or 4 hours it said that the iteration limit was reached. So I set 'iterationlimit' to 100000000 and now Maple keep evaluating more than 12 hours.

I run Maple at my notebook with these spesification:

Processor: Intel Corei3-5005U 2.0 GHz

Memory: 4GB RAM

Windows 10

 

It is normal? Or I must run Maple in higher notebook spesification?

Thank you in advance.

 

Below is my Maple file, hope you can help me.

ISL_2017_FASE3.mw

I apologize, as I'm still very new. I've flipped through a lot of pages, but I'm unsure of how Maple code translates to Maple TA.

 

I have randomly assigned an integer for the value of a year in Maple TA. I'd like it to appear as "2013" for example, but it will instead appear as "2,013". Is there a way to set the output formatting of a variable individually within a problem in TA?

Thanks!


Dear all,

I wold like to find the solution of the next system of two equations with three unknowns but we assume that the unknows are positive integers. How the following code can work. Many thanks

 

 

 

> restart;
> assume(J, integer, J >= 0);
> assume(A, integer, A >= 0);
> assume(T, integer, T >= 0);
> eq1 := J+10*A+50*T=500;
   eq2 := J+A+T = 100;
  solve( {eq1,eq2},{J,A,T});

if you want a random interger between 0 and 100

what will be the command?

Hi Maple Primes

I have this parabola -

y2:=6z^2 +z+244;

x2:=9z^2+3z+367;

I use the eliminate command to write without z;

c:=eliminate([y=y2,x=x2],z);

Then I have the expression

e2 = 4x^2-12xy+9y^2-7x+9y+369.

My questions is, what integer values for x and y are on the curve e2?

I think the answer may be exactly when z is an integer.

How could I determine this given only e2?

Regards,
Matt

>nombor1:=[4,6,2];

nombor1:=[4,6,2]

 

Hi, anyone know hot i need to continue my command to get 462 from [4,6,2]?

Thank you~=]]

>mylist:=468;

mylist:=468

 

Hi, how i need to continue my command to get [4,6,8] from 468?

Thank you~=]]

I use Mathematica. This code finds integer points on the sphere

(x-2)^2 + (y-4)^2 + (c-6)^2 =15

and select two of them so that distance of two this points equal to 4.

ClearAll[a, b, r, c];
a = 2;
b = 4;
c = 6;
r = 15; ss =
Subsets[{x, y, z} /.
Solve[{(x \[Minus] a)^2 + (y \[Minus] b)^2 + (z \[Minus] c)^2 ==
r^2, x != a, y != b, z != c, x y z != 0}, {x, y, z},
Integers], {2}];
t = Select[ss, And @@ Unequal @@@ Subsets[Flatten[#], {2}] &];
Length[t]
Select[ss, Apply[EuclideanDistance, #] === 4 &]

 

and this code select four points on the shere so that none of three points make a right triangle

ClearAll[a, b, r, c];
a = 2;
b = 4;
c = 6;
r = 15;
ss = Subsets[{x, y, z} /.
Solve[{(x - a)^2 + (y - b)^2 + (z - c)^2 == r^2, x != a, y != b,
z != c, x y z != 0, x > y}, {x, y, z}, Integers], {4}];
nonright =
Pick[ss, (FreeQ[#, \[Pi]/2] &) /@ ({VectorAngle[#2 - #1, #3 - #1],
VectorAngle[#1 - #2, #3 - #2],
VectorAngle[#1 - #3, #2 - #3]} & @@@ ss)];
Select[nonright, (12 == Length[Union @@ #] &)]

 I am looking for a  procedure in Maple.  I have some problems with this sphere. For example:

Choose four points so that 12 coordinates difference and it makes a square.

Can your code improve with sphere?

When I use the option assume = nonnegint or integervariables = {...} in Optimization[Minimize], or Optimization[LPSolve] I've got the message "kernel connection lost'. 

 

Thie even happens when I use the simple example from the Maple help:

with(Optimization):
LPSolve(2*x+5*y,{3*x-y=1,x-y<=5},assume={nonnegative,integer});

 

It says; mserver.exe has stopped working. 

What's wrong? 

How can I generate some n-tuple random list of integers s.t. any component is between -30 and 50? For example if n=5 then four random of such 5-tuple are

[-1,2,8,7,9] , [0,-9,2,-3,-5] , [4,5,3,-8,-1] , [12, -5, 0, 6,8]

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