Wednesday, September 9, 2015

geometric mean and sieve

We usually think of the mean of two numbers a and c as their average b = 1/2(+ c). Another way to think of b is that it is the number that makes a, b, c an arithmetic sequence, so b is more properly called the arithmetic mean of a and c. Similarly, we can find the geometric mean of two numbers, a and c. This time, b will be the number that makes a, b, c into a geometric sequence. The geometric mean of two numbers a and c is given by b = sqrt (* c).

Here is a construction for the geometric mean of two numbers that uses a parabola in an interesting way: 
  1. Graph the parabola y = x^2.
  2. Plot the points a and c on the y axis: let A be (0,a) and let C be (0,c).
  3. Draw a line through A parallel to the x axis - the point where it touches the parabola's positive arm is A'. Do the same for C - the point where it touches the parabola's negative arm is C'.
  4. Draw the line through A' C'.  The point where this line crosses the y axis is B = (0, b), where b is the geometric mean of a, c.


This construction of the geometric mean can be used to create a geometric prime sieve. Usually, we visualize the sieve of Eratosthenes on a number chart. Starting with 2, w cross out all the multiples of 2 (except for 2 itself): these numbers are clearly not prime. Then we continue with the first number that we did not cross out, 3, and cross out all its multiples (except for 3 itself)... if we continued indefinitely we will cross out all composites, leaving only primes behind (we have woven a sieve that only lets the primes fall through). Practically, if we are hunting for primes less than n, we only need to go as far as crossing out multiples of primes up to sqrt(n).


Here is how we can construct a similar prime sieve using a parabola - the geometric mean construction can help you see why we are able to hit all the composites.

1. Graph the parabola y = x^2.
2. Plot the points on the parabola obtained from x = -2, -3, -4, ...



3. Plot x = 2 on the parabola. Draw lines from this point on the parabola to each point drawn in step 2. The y-intercepts of these lines are the multiples of 2.




4. Plot x = 3 on the parabola. Draw lines from this point on the parabola to each point drawn in step 2. The y-intercepts of these lines are the multiples of 3.


5. Continue the process for x values that are not among the multiples found in previous steps.The numbers on the y axis, greater than 1 that are not touched by the constructed lines are the primes left behind by the sieve.