Prime Numbers
A Prime number is a natural number with exactly two distinct natural number divisors: 1 and itself. Otherwise a number is called a composite number. Therefore, 1 is not a prime, since it only has one divisor, namely 1. A number \(n > 1\) is prime if it cannot be written as a product of two factors \(a\) and \(b\), both of which are greater than 1: n = ab.
• The first twenty-six prime numbers are:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101
• Note: only positive numbers can be primes.
• There are infinitely many prime numbers.
• The only even prime number is 2, since any larger even number is divisible by 2. Also 2 is the smallest prime.
• All prime numbers except 2 and 5 end in 1, 3, 7 or 9, since numbers ending in 0, 2, 4, 6 or 8 are multiples of 2 and numbers ending in 0 or 5 are multiples of 5. Similarly, all prime numbers above 3 are of the form \(6n-1\) or \(6n+1\), because all other numbers are divisible by 2 or 3.
• Any nonzero natural number \(n\) can be factored into primes, written as a product of primes or powers of primes. Moreover, this factorization is unique except for a possible reordering of the factors.
• Prime factorization: every positive integer greater than 1 can be written as a product of one or more prime integers in a way which is unique. For instance integer \(n\) with three unique prime factors \(a\), \(b\), and \(c\) can be expressed as \(n=a^p*b^q*c^r\), where \(p\), \(q\), and \(r\) are powers of \(a\), \(b\), and \(c\), respectively and are \(\geq1\).
Example: \(4200=2^3*3*5^2*7\).
• Verifying the primality (checking whether the number is a prime) of a given number \(n\) can be done by trial division, that is to say dividing \(n\) by all integer numbers smaller than \(\sqrt{n}\), thereby checking whether \(n\) is a multiple of \(m\leq{\sqrt{n}}\).
Example: Verifying the primality of \(161\): \(\sqrt{161}\) is little less than \(13\), from integers from \(2\) to \(13\), \(161\) is divisible by \(7\), hence \(161\) is not prime.
Note that, it is only necessary to try dividing by prime numbers up to \(\sqrt{n}\), since if n has any divisors at all (besides 1 and n), then it must have a prime divisor.
• If \(n\) is a positive integer greater than 1, then there is always a prime number \(p\) with\(n < p < 2n\).
Finding the Number of Factors of an Integer
First make prime factorization of an integer \(n=a^p*b^q*c^r\), where \(a\), \(b\), and \(c\) are prime factors of \(n\) and \(p\), \(q\), and \(r\) are their powers.
The number of factors of \(n\) will be expressed by the formula \((p+1)(q+1)(r+1)\). NOTE: this will include 1 and n itself.
Example: Finding the number of all factors of 450: \(450=2^1*3^2*5^2\)
Total number of factors of 450 including 1 and 450 itself is \((1+1)*(2+1)*(2+1)=2*3*3=18\) factors.
Greatest Common Factor (Divisior) - GCF (GCD)
The greatest common divisor (gcd), also known as the greatest common factor (gcf), or highest common factor (hcf), of two or more non-zero integers, is the largest positive integer that divides the numbers without a remainder.
To find the GCF, you will need to do prime-factorization. Then, multiply the common factors (pick the lowest power of the common factors).
• Every common divisor of a and b is a divisor of gcd(a, b).
• a*b=gcd(a, b)*lcm(a, b)
Lowest Common Multiple - LCM
The lowest common multiple or lowest common multiple (lcm) or smallest common multiple of two integers a and b is the smallest positive integer that is a multiple both of a and of b. Since it is a multiple, it can be divided by a and b without a remainder. If either a or b is 0, so that there is no such positive integer, then lcm(a, b) is defined to be zero.
To find the LCM, you will need to do prime-factorization. Then multiply all the factors (pick the highest power of the common factors).
Perfect Square
A perfect square, is an integer that can be written as the square of some other integer. For example 16=4^2, is an perfect square.
There are some tips about the perfect square:
• The number of distinct factors of a perfect square is ALWAYS ODD.
• The sum of distinct factors of a perfect square is ALWAYS ODD.
• A perfect square ALWAYS has an ODD number of Odd-factors, and EVEN number of Even-factors.
• Perfect square always has even number of powers of prime factors.
Divisibility Rules
2 - If the last digit is even, the number is divisible by 2.
3 - If the sum of the digits is divisible by 3, the number is also.
4 - If the last two digits form a number divisible by 4, the number is also.
5 - If the last digit is a 5 or a 0, the number is divisible by 5.
6 - If the number is divisible by both 3 and 2, it is also divisible by 6.
7 - Take the last digit, double it, and subtract it from the rest of the number, if the answer is divisible by 7 (including 0), then the number is divisible by 7.
8 - If the last three digits of a number are divisible by 8, then so is the whole number.
9 - If the sum of the digits is divisible by 9, so is the number.
10 - If the number ends in 0, it is divisible by 10.
11 - If you sum every second digit and then subtract all other digits and the answer is: 0, or is divisible by 11, then the number is divisible by 11.
Example: to see whether 9,488,699 is divisible by 11, sum every second digit: 4+8+9=21, then subtract the sum of other digits: 21-(9+8+6+9)=-11, -11 is divisible by 11, hence 9,488,699 is divisible by 11.
12 - If the number is divisible by both 3 and 4, it is also divisible by 12.
25 - Numbers ending with 00, 25, 50, or 75 represent numbers divisible by 25.[/textarea]