« previous | Tuesday, March 19, 2013 | next »
Midterm on Thursday
Euler's Theorem
Given , where , we have
Proof
Consider the elements of : Call them .
Since , this set of elements is equal to . This is because and imply that .
Therefore, the numbers are all relatively prime to . Moreover, implies that (since ), so are all distinct
Therefore the product can be simplified to .
Complexity
The devil is in the details: practical complexity depends on the Big-Oh constants!
For example: The main algorithms for multiplications:
- Grade school:
- Kanatsuba-Offman:
- Fast Fourier Transform:
However, if -ish, grade-school is fastest. If -ish, Karatsuba-Offman is fastest. Anything -ish, FFT is fastest.
Counting Digits
- = floor of = greatest integer
- = ceiling of = least integer
Derive a simple explicit formula for the number of base-10 digits of .
Experimentally, it looks like works.
Indeed, if has decimal digits, then .
In general, the number of base- digits of is
Square Roots Mod
Find the square roots of 16 mod 437 = 19 · 23.
Square roots are:
Combined by CRT, we get
- ±4