File - Eric Tuzin Math 4371 Portfolio

advertisement
Names:
/
/
.
Chapter 3
Elementary Number Theory
The expression lcm(m,n) stands for the least integer which is a multiple of both the
integers m and n. The expression gcd(m,n) stands for the biggest integer that
divides both m and n.
Exercise. Find lcm and gcd in your SGC CATALOG.
Following the procedures of the first Chapter 1, compute each of the following
integers.
B&P
SGC
CAS
gcd(6,8)
2
2
2
lcm(6,8)
24
24
24
gcd(6,8)lcm(6,8) 48
48
48
gcd(140,429)
1
1
1
lcm(140,429)
60060
66060
66060
Product of
previous 2
numbers
140*429
60060
66060
66060
60060
66060
66060
Comments
= to product of
two numbers
(6,8)
Exercise. Experiment with several different pairs of integers m and n computing
gcd(m,n)*lcm(m,n) and m*n. What relationship is suggested by your experiment?
The two values are EQUAL
I think it’s time to forget the pencil computations and rely solely on the technology
and our brains. Don’t you agree?
SGC
CAS
Comments
2
gcd( 101+45,36 ) 2
2
lcm( 5(1+43),25 )
94608
94608
36
gcd( 36,16)
lcm (38,100)
gcd( 38,100)
9
9
950
950
lcm(1524,5567)
8484108
8484108
lcm(2000,6000)
6000
6000
Notice that the last 2 results show us that bigger integers don't necessarily yield
bigger lcm's.
gcd( 1013,1050
)
Error
50
lcm( 146,1515 )
Error
3297137811802734375000000
gcd(your SID,
your friends
SID)
lcm(your SID,
your friends
SID)
1
1
1.254946151E14
125494615133573
Two integers are said to be relatively prime if the biggest integer that divides both
of them is 1.
Exercise. List all pairs of integers from 100 to 105 that are relatively prime.
* You might find the programs at the end of this chapter to be interesting.
100 and 101, 100 and 103, 101 and 102, 101 and 103, 101 and 104, 101 and
105, 102 and 103, 103 and 104, 103 and 105, 104 and 105
An integer is said to be prime if its only divisors are 1 and itself, otherwise it is
called composite. For example 2,3,5,&7 are the only primes less than 10. What are
the primes between 10 and 20?
11,13,17,19
The MAPLE command "isprime" determines whether or not a given integer is
prime. Use it to see if the following numbers are prime. In each case leave the P if
prime and leave the C if composite.
29
35
1537
your ss#
10!+1
329891.
P
C
C
C
C
P
The FUNDAMENTAL THEOREM OF ARITHMETIC states that every integer
can be factored in a unique way into a product of powers of primes.
Exercise. Use paper and pencil, aided by your SGC if necessary, to write each of
the following numbers as a product of powers of primes:
i. 10!= (2)^8*(3)^4*(5)^2*(7)
(2)^5*(3)^2*(7)*(13)^2
ii. 340704=
The MAPLE command "ifactor" does this automatically. Now use it to compute the
prime factorization for each of the following:
(2)^8*(3)^4*(5)^2*(7)
i. 10!
ii. 340704
iii. 10!+1=
(2)^5*(3)^2*(7)*(13)^2
(11)*( 329891)
iv. 100!=
iv. your ss# =
(2)^97*(3)^48*(5)^24*(7)^16*(11)^9*(13)^7*(17)^5*(19)^5*(
23)^4*(29)^3*(31)^3*(37)^2*(41)^2*(43)^2*(47)^2*(53)*(59)
*(61)*(67)*(71)*(73)*(79)*(83)*(89)*(97)
(5)*(9733)*(13259)
(Notice how just adding 1 to 10! reduced the number of prime factors.)
For two integers m & n with n>m we say the remainder of n divided by m is r if
n = qm + r, for integers q &r with 0<r<m. In MAPLE this remainder is denoted
by "n mod m". In your SGC CATALOG it is denoted by "mod(n,m)".
Exercise Use P&B, SGC, and CAS to compute the following remainders:
P&B
SGC
CAS
24 mod 5
4
4
4
156 mod 7
2
2
2
32 mod 2
0
0
0
57 mod 2
1
1
1
Compute each of the following remainders using your SGC first and the CAS next.
SGC
CAS
13200 mod 134
68
68
(123+53) mod 26
13
13
(400*23) mod 18
2
2
1321 mod (5*7)
26
26
4516 mod 2
Error
1
Exercise. In the last problem, which answer do you think is correct?
CAS
Explain
Because the number is so close to zero, the CAS rounded.
Exercise. Explain why an integer n is even exactly when n mod 2 =0, and n is odd
exactly when n mod 2 =1.
If an integer is evenly divisible by 2 (ie when n mod 2=0) then by
definition of an even number the integer is even. If the integer is not
evenly divisible by 2 (ie when n mod 2=1) then it is NOT even, and is
therefore odd. An integer must be either odd or even. Anything mod 2 is
either 1 or 0.
Recall the statement of the BINOMIAL THEOREM.
Exercise. Use the binomial theorem to expand (ie. compute the binomial
coefficients)
x^3+3x^2y+3xy^2+y^3
i. (x + y)3=
and
ii. (n +1)4=
n^4+4n^3+6n^2+4n+1
Exercise. Explain why every power of an odd integer must also be an odd integer.
First using the Fundamental Theorem of Arithmetic.
All factors of an odd integer must also be odd integers.
Therefore, if you raise an odd integer to a power n, it would
multiply that odd integer times itself n times. Since multiplying
an odd integer times an odd integer yields an odd integer, then
raising an odd integer to a power must also yield an odd integer
Second using the Binomial Theorem.
You should be able to compute each of the following using brain only. Do so and
then check your answer using both technologies. Record your results in the
appropriate places.
Brain
SGC
CAS
0
1342 mod 2
0
0
(10!+1) mod 2
1
1
1
179 mod 2
1
1
1
1711 mod 2
1
ERROR
1
1712 mod 2
1
ERROR
1
Comments
1342 is even
mod 2 =0
10!+1 is odd
Mod 2=0
17 to any
power is odd
Exercise. Explain why your SGC thinks 1712 is even when we, and MAPLE, know
better. It approximates 17^12 as a floating point number.
Excerise. Describe the Sieve of Aristophanes for finding “all” the primes.
The sieve eliminates multiples of prime numbers, therefore only leaving
the actual prime numbers.
Exercise. Provide a convincing explanation for why the Fundamental Theorem of
Arithmetic is true.
Any number can be written as the product of factors of primes. A prime
number is any number that is only divisible by 1 and itself. Therefore
if the FTA is applied to any integer, we know the number is either a
prime number or a composite number, which would be a multiple of some
prime numbers found by using the Sieve of Aristophanes.
Exercise. Provide a convincing argument for why the Binomial Theorem is true.
Reflection:
1. What are the main things you learned from Chapter 3?
2. What is the hardest thing to understand from Chapter 3?
I struggled to understand (and still currently don’t understand) exactly
what the Binomial Theorem does.
* Look at the following MAPLE programs. Try to determine what they should do
and then execute them to see if you were correct. (To move from a line of MAPLE
input to another line without MAPLE wanting to execute something, hold down the
shift key as you press the enter key.)
Program I
for i from 1 to 100
do
if
isprime(i)=true
then print(i)
fi;
od;
Lists the primes between 1 and 100
>
Program II
> for i from 100 to 105
do
for j from i to 105
do
if
gcd(i,j)=1
then print(i,j);
fi;
od;
od;
Write a program that lists the first 20 perfect cubes.
Program
> for i from 1 to 20
do
i^3
od;
Download