MATH
319 Group Exercise #1 Maple and the GCD
Names_________________________________________________
1. Log on to the computer and open Maple 6
under Programs or Math Applications.
Maple does exact arithmetic unless you tell it otherwise. In this first exercise we will just compute
some numbers. Note that multiplication
always requires a multiplication sign (*).
Also, the semicolon is the end of line operator. The semicolon followed by enter will
execute the operation. sqrt is the
exact square root operator.
Compute
the following numbers:
a) (2)(3)(5)(7)(11)+1=______________ b) = __________
b) 212 + 1 = ____________ d) 250 +
1 = ____________
e) = ____________ f)
= ____________
2. Go to
File, Open, Athena, MATH . Find
the MATH Out Box and look for a program called GCD2 under my name. Load that program. Note that to assign a value to a variable one uses := (colon
followed by equals).
The
program calculates the value of the GCD of two numbers – a and b. It also at the bottom gives the numbers – x
and y – such that GCD(a,b) = ax + by.
Find
:
a) (210-1,212-1) =
_________ b) (109-1,373)
= ________
c)
(2100-1,2120-1) = __________ d) (35+24,37+25)
= ________
Find
values of x and y in the integers that satisfy: (if possible)
a)
33x + 72y = 3, x = ____, y = _____, b) 33x + 72y = 12, x =____, y =_____
c)
54x + 86y = 3, x = ____, y = ____, d) 81x + 107y = 1, x = ______, y = _______
e)
(214+1)x + (310 – 1)y = 1, x = _______________, y =_____________
3. In Maple there is a package of functions
useful in Number Theory. To load these
type with(numtheory); The
function of interest is ifactor.
This function writes out the prime factorization of a given number. For example ifactor(24); would yield (23)(3).
On a new line define n = 10. (Remember the colon equals). We will check that the product of five consecutive integers is divisible by 120.
The
product of (n-2)(n-1)n(n+1)(n+2) is n5 – 5n3 + 4n.
On
the line below n:=10 type
ifactor(n^5-5*n^3+4*n);
For
each of the following values of n compute ifactor(n^5-5*n^3+4*n). Does it have factors that yield 120 as a
factor?
n |
ifactor(n^5-5*n^3+4*n) |
10 |
|
20 |
|
100 |
|
10289 |
|
Note
that you can change the value of n in the line above ifactor(n^5-5*n^3+4*n).