Topic 7.0
1. Every number can be decomposed into a product of primes. 84=22*31*50*71*110*130*170.,,
2. Greatest common divisor gcd(x, y)=2min(j0,k0)*3min(j1,k1)*5min(j2,k2)*…
Least common multiple lcm(x,y)= 2max(j0,k0)*3max(j1,k1)*5max(j2,k2)*…
gcd(x,y) * lcm(x,y)=xy;
3. Check for Primality:
1) Method 1: Iterate up through the square root of n
2) Method 2: Only check is n is divisible by a prime number.
4. Generating a List of Primes: The Sieve of Eratosthenes.
To optimize: only use odd numbers in the array—reduce our space usage by half.