10 = deca
100 = hecto
1,000 = kilo
1,000,000 = mega
1,000,000,000 = giga
1,000,000,000,000 = tera
1,000,000,000,000,000 = peta
1,000,000,000,000,000,000 = exa
1,000,000,000,000,000,000,000 = zetta
1,000,000,000,000,000,000,000,000 = yotta
10 = deca
100 = hecto
1,000 = kilo
1,000,000 = mega
1,000,000,000 = giga
1,000,000,000,000 = tera
1,000,000,000,000,000 = peta
1,000,000,000,000,000,000 = exa
1,000,000,000,000,000,000,000 = zetta
1,000,000,000,000,000,000,000,000 = yotta
When we’re programming, if we want to swap values of two integer values, the “normal” way we do it would look like:
x = 5 y = 3 temp = x x = y y = temp
We need a temporary variable as a container to hold a value first then do the swap.
What if in some situation you can’t use the extra variable? How would you do it?
Well, let’s forget computer programming but pick up some little math we learned in elementary school:
x = 5 y = 3 x = x - y (=2) y = x + y (=5) x = y - x (=3)
Here we go!
Problem: Two prime numbers (>=5) and there are one and only one number between them, such as (5, 7), (11, 13), (17, 19), etc.. Prove the sum of such two prime numbers can always be divided by 6.
Answer: All the natural numbers can be expressed as 6n+0, 6n+1, 6n+2, 6n+3, 6n+4, 6n+5, n >= 0. 6n+{0,2,4} are all even and 6n+3 can be divided by 3, so they are not prime numbers (2 is prime, but the problem is asking prime >= 5, so we ignore 2 here). Therefore, prime numbers can be only in two forms: 6n+1 and 6n+5.
Let p1 = 6n+5 and p2 = 6(n+1)+1, there is only 6(n+1)+0 between them, which satisfies the constraint in problem description. Then, p1 + p2 = 6n+5 + 6(n+1)+1 = 6(2n+2) which obviously can always be divided by 6. Note that p1 and p2 can be any two natural numbers satisfy that constraint, therefore two prime numbers. This example concludes our proof.