------------------------------------------------------------ b`x a.k.a. | Math.pow(b,x) | ------------------------------------------------------------ e.g. 10`2 is | 10*10 | which has the value | 100 | ------------------------------------------------------------ e.g. 5`4 is | 5*5*5*5 | which is | 625 | ------------------------------------------------------------ e.g. 2`8 is 2*2*2*2*2*2*2*2 which is | 256 | ------------------------------------------------------------
  • b`x + b`x =?= b`(2*x) ? | NO | ------------------------------------------------------------ | but to 2*(b`x`) | ------------------------------------------------------------
  • 2`x + 2`x =?= 2`(x+1)` ? | yes | ------------------------------------------------------------ (using simplification as with preceding question) to 2*(2`x`) which equals (2`1`)*(2`x`) which by Law 1 equals 2`(1+x) ------------------------------------------------------------ 2`8 + 2`8 == | 256 + 256 == 512 == 2`9` == 2`(8+1)` | ------------------------------------------------------------ 0 | | 1 | ------------------------------------------------------------ 1 | | 2 | ------------------------------------------------------------ 2 | | 4 | ------------------------------------------------------------ 3 | | 8 | ------------------------------------------------------------ 4 | | 16 | ------------------------------------------------------------ 5 | | 32 | ------------------------------------------------------------ 6 | | 64 | ------------------------------------------------------------ 7 | | 128 | ------------------------------------------------------------ 8 | | 256 | ------------------------------------------------------------ 9 | | 512 | ------------------------------------------------------------ 10 | | 1024 | ------------------------------------------------------------ | 2`10 is appproximately 1000 | ------------------------------------------------------------ 2`31 == 2`( | 10 + 10 + 10 + 1 | ) ------------------------------------------------------------ == | 2`10 * 2`10 * 2`10 * 2`1` | by Law (i) ------------------------------------------------------------ which is | approximately 1000 * 1000 * 1000 * 2 | ------------------------------------------------------------ which is | 2,000,000,000 a.k.a. 2 billion (a.k.a. 2G) | ------------------------------------------------------------ 2`-1 := | 1/2 | ------------------------------------------------------------ 2`-2 := | 1/4 | ------------------------------------------------------------ 2`-3 := | 1/8 | ------------------------------------------------------------ inverse of exponentiation is | logarithm | ------------------------------------------------------------ e.g. log_2(32) returns | 5 | ------------------------------------------------------------ because | 5 | works for the value x in the expression 2`x := 32 ------------------------------------------------------------ e.g. log_10(1000) returns | 3 | ------------------------------------------------------------ e.g. log_2(1000) returns | approximately 10 | ------------------------------------------------------------ e.g. [0] 2`log_2(32) := 2` | 5 | := | 32 | ------------------------------------------------------------ e.g. [3] log_2(1000) := log_10(1000)/log_10( | 2 | ) := | 3 | / | .30... | ------------------------------------------------------------ | which is approximately 10 | ------------------------------------------------------------ == 8*( | 2*5 | )*( | 2*5 | )*( | 2*5 | )*( | 2*5 | ) ------------------------------------------------------------ == | 128*625 | (gathering powers) ------------------------------------------------------------ then log_5(80000) := log_5( | 625*128 | ) := | log_5(625) + log_5(128) | by (1) ------------------------------------------------------------ which is | 4 + approximately 3 | ------------------------------------------------------------ := 3* | approximately | ------------------------------------------------------------ := | approximately | ------------------------------------------------------------ similarly Computing Sciences has a main base used for logarithms: | 2 | ------------------------------------------------------------ e.g. lg(8) := | 3 | ------------------------------------------------------------ e.g. lg(32) := | 5 | ------------------------------------------------------------ e.g. 15 := | 3 * 5 | ------------------------------------------------------------ e.g. 22 := | 2 * 11 | ------------------------------------------------------------ e.g. 42 := | 6 * 7 | := | 2 * 3 * 7 | ------------------------------------------------------------ e.g. 18 := | 2 * 3 * 3 := 2 * 3`2 | ------------------------------------------------------------ e.g. 40 := | 2 * 2 * 2 * 5 := 2`3 * 5 | ------------------------------------------------------------ e.g. 64 := | 2 * 2 * 2 * 2 * 2 * 2 := 2`6 | ------------------------------------------------------------ some numbers do not factor into smaller ones, in which case we call them | prime | ------------------------------------------------------------ e.g. | 17 is prime | ------------------------------------------------------------ e.g. | 3 is prime | ------------------------------------------------------------ e.g. | 2 is prime | ------------------------------------------------------------ a number n is called "composite" iff | n > 1 and it's not prime | . ------------------------------------------------------------ first divide out and save all the factors of the first prime | 2 | , ------------------------------------------------------------ then divide out and save all the factors of the next prime | 3 | , ------------------------------------------------------------ then divide out and save all the factors of the next prime | 5 | , ------------------------------------------------------------ then divide out and save all the factors of the next prime | 7 | , ------------------------------------------------------------ then divide out and save all the factors of the next prime | 11 | , ------------------------------------------------------------ &* a number is divisible by 2 iff its last digit is | 2/4/6/8/0 | ------------------------------------------------------------ &* a number is divisible by 5 iff | its last digit is 5/0 | ------------------------------------------------------------ 24 / 2 = 12 // save one 2 12 / 2 = 6 // save another 2 6 / 2 = 3 // save another 2 finish with prime 3 summarizing, 24 = 2 * 2 * 2 * 3 = 2`3 * 3 ------------------------------------------------------------ 25 isn't even so no 2s sum of digits 2 + 5 := 7 not divisible by 3 so no 3s 25 / 5 = 5 // save one 5 finish with prime 5 summarizing, 25 = 5 * 5 = 5`2 ------------------------------------------------------------ 26 / 2 = 13 // save one 2 13 isn't even so no more 2s 1 + 3 = 4 which is not divisible by 3 so no 3s could check whether factors include 5, 7, 11 but DON'T BOTHER CHECKING PRIMES WHOSE SQUARES ARE LARGER THAN NUMBER and 5`2 = 25 so finish with 13 now known to be prime summarizing, 26 = 2 * 13 ------------------------------------------------------------ e.g. for | ___ | ------------------------------------------------------------ the "factorial" of an integer n, denoted | n! | , ------------------------------------------------------------ e.g. 2! := 2*1 := | 2 | ------------------------------------------------------------ e.g. 5! := 5*4*3*2*1 := | 120 | ------------------------------------------------------------ as a special case, 0! is defined to be | 1 | ------------------------------------------------------------ if the number of values is zero then we get the result | 0 | , ------------------------------------------------------------ if the number of values is zero then we get the result | 1 | ------------------------------------------------------------ 2`3 = 2*2*2 := | 8 | ------------------------------------------------------------ 2`2 = 2*2 := | 4 | ------------------------------------------------------------ 2`1 = 2 := | 2 | ------------------------------------------------------------ 2`0 = &_ := | 1 | ------------------------------------------------------------ 3! = 3*2*1 := | 8 | ------------------------------------------------------------ 2! = 2*1 := | 4 | ------------------------------------------------------------ 1! = 1 := | 2 | ------------------------------------------------------------ 0! = &_ := | 1 | ------------------------------------------------------------ a.k.a. | Math.floor(x) | ------------------------------------------------------------ a.k.a. | Math.ceil(x) | ------------------------------------------------------------ e.g. L1.414R := | 1 | ------------------------------------------------------------ e.g. L1.618R := | 1 | ------------------------------------------------------------ e.g. T1.414I := | 2 | ------------------------------------------------------------ e.g. T1.618I := | 2 | ------------------------------------------------------------ | 1,079,966,465,309ms - 1,074,966,465,309ms := 5,000,000,000ms | ------------------------------------------------------------ 1000ms/s * 60s/m * 60m/h * 24h/d := | 86400000 | ms/d ------------------------------------------------------------ then | 5,000,000,000ms / 86400000ms/d := 57.87... days | ------------------------------------------------------------ but if the time-difference in days is | 57.87 | , ------------------------------------------------------------ using floor, L57.87...R := | 57 | ------------------------------------------------------------ using ceiling, T57.87...I := | 58 | ------------------------------------------------------------ 126 -23 --- subtracted 1 time so far 103 -23 --- subtracted 2 times so far 80 -23 --- subtracted 3 times so far 57 -23 --- subtracted 4 times so far 34 -23 --- subtracted 5 times so far 11 q is 5, r is 11 ------------------------------------------------------------ e.g. 48/5 := | 9.6 | ; ------------------------------------------------------------ L48/5R := L | 9.6 | R := | 9 | ------------------------------------------------------------ e.g. dividing n=48 by d=5 yields q := | 9 | and r := | 3 | ------------------------------------------------------------ satisfying (n=48) == (d=5)*(q= | 9 | ) + (r= | 3 | ) ------------------------------------------------------------ and (r= | 3 | ) being one of the values {0,1,2,...,(d-2= | 3 | ),(d-1= | 4 | )} ------------------------------------------------------------ e.g. dividing n=52 by d=3 yields q := | 17 | and r := | 1 | ------------------------------------------------------------ e.g. dividing n=64 by d=8 yields q := | 8 | and r := | 0 | ------------------------------------------------------------ e.g. dividing n = -25 by d = 7 yields q := | -3? | and r := | -4? | ------------------------------------------------------------ the values for r being considered here are only {0,1,2,...,(d-2= | 5 | ),(d-1= | 6 | )} ------------------------------------------------------------ which forces q := | -4 | and r := | 3 | ------------------------------------------------------------ satisfying (n=-25) == (d=7)*(q= | -4 | ) + (r= | 3 | ) ------------------------------------------------------------ e.g. (-25)/7 := | -3.571428... | ; ------------------------------------------------------------ L(-25)/7R := L | -3.571428... | R := | -4 | ------------------------------------------------------------ e.g. dividing n = -1 by d = 7 yields q := | 0?? | and r := | -1?? | ------------------------------------------------------------ again, the values for r being considered here are only {0,1,2,...,(d-2= | 5 | ),(d-1= | 6 | )} ------------------------------------------------------------ which forces q := | -1 | and r := | 6 | ------------------------------------------------------------ satisfying (n=-1) == (d=7)*(q= | -1 | ) + (r= | 6 | ) ------------------------------------------------------------ e.g. (-1)/7 := | -0.14285714... | ; ------------------------------------------------------------ L(-1)/7R := L | -0.1428571428... | R := | -1 | ------------------------------------------------------------ "n | mod | d" returns the remainder r obtained as above ------------------------------------------------------------ here "mod" may be read | "modulo" | ------------------------------------------------------------ so might use identifier | "m" | instead of "d" ------------------------------------------------------------ e.g. 27 mod 5 := | 2 | ------------------------------------------------------------ e.g. 21 mod 7 := | 0 | ------------------------------------------------------------ (in Java as well as in C++ and C, can use | % | for "mod" ------------------------------------------------------------ e.g. 21 mod 7 := | 0 | , ------------------------------------------------------------ 39 mod 7 := | 4 | , ------------------------------------------------------------ 6 mod 7 := | 6 | , ------------------------------------------------------------ -25 mod 7 := | 3 | , ------------------------------------------------------------ -2 mod 7 := | 5 | , ------------------------------------------------------------ 71 mod 7 := | 1 | , ------------------------------------------------------------ the range of values possible for x mod 7 is { | 0,1,2,3,4,5,6 | } ------------------------------------------------------------ generally, the range of values possible for x mod m is { | 0,1,2,...,m-1 | } ------------------------------------------------------------ e.g. | 1535 | ------------------------------------------------------------ e.g. x_1 := (101* | 1535 | + 997) mod 1999 ------------------------------------------------------------ := ( | 155035 | + 997) mod 1999 ------------------------------------------------------------ := | 156032 | mod 1999 ------------------------------------------------------------ := | 110 | ------------------------------------------------------------ e.g. x_2 := (101* | 110 | + 997) mod 1999 ------------------------------------------------------------ := ( | 11110 | + 997) mod 1999 ------------------------------------------------------------ := | 12107 | mod 1999 ------------------------------------------------------------ := | 113 | ------------------------------------------------------------ e.g. x_3 := (101* | 113 | + 997) mod 1999 ------------------------------------------------------------ := ( | 11413 | + 997) mod 1999 ------------------------------------------------------------ := | 12410 | mod 1999 ------------------------------------------------------------ := | 416 | ------------------------------------------------------------ e.g. x_4 := (101* | 416 | + 997) mod 1999 ------------------------------------------------------------ := ( | 42016 | + 997) mod 1999 ------------------------------------------------------------ := | 43013 | mod 1999 ------------------------------------------------------------ := | 1034 | ------------------------------------------------------------ e.g. x_5 := (101* | 1034 | + 997) mod 1999 ------------------------------------------------------------ := ( | 104434 | + 997) mod 1999 ------------------------------------------------------------ := | 105431 | mod 1999 ------------------------------------------------------------ := | 1483 | ------------------------------------------------------------ thus x_0 := | 1535 | , x_1 := | 110 | , x_2 := | 113 | , x_3 := | 416 | , ------------------------------------------------------------ x_4 := | 1034 | , x_5 := | 1483 | , ... ------------------------------------------------------------ | 1535 | mod 10 yields | 5 | ------------------------------------------------------------ | 32 | mod 10 yields | 0 | ------------------------------------------------------------ | 126 | mod 10 yields | 3 | ------------------------------------------------------------ | 1723 | mod 10 yields | 6 | ------------------------------------------------------------ | 1020 | mod 10 yields | 4 | ------------------------------------------------------------ ====================================================================


    (Copyright © 2009 by Hugh McGuire   — for thoughts about this, see   http://www.cis.gvsu.edu/~mcguire/teaching/copyright_thoughts.html .)