Primes, area under the curve


One of the things that strikes me as being odd about prime and non-prime numbers is the concept of factors. That is, “a number is prime if it can only be evenly divided by itself and by 1”. Conversely, “a number is not prime if it can be evenly divided by any number other than 1 and itself”. So, if we take a non-prime number like six, it can be evenly divided by 1, 2, 3 and 6. The factors for “n=6”, not including 1 and 6 itself, are 2 and 3. Pretty elementary stuff, I know. But what does “2” and “3” represent here?

Y = 2 x 3

This is a rectangle that is 2 units tall by 3 units wide; or, 3 units tall by 2 units wide. In other words, “6” is the area under the curve for the equation y = 2, for x from 0 to 3; or y = 3, for x from 0 to 2.

If we took the integral of f(x) = 2, we’d get ∫f(x)dx = 2x.  If we solve for 2x = 6, then x = 3.

Again, mind-numbingly obvious. But, if ∫f(x)dx = 7, then x = 3.5. Since we only want solutions that give integer values, this equation gets rejected as having no solution.

For a slightly larger set of solutions, we could “solve” for ∫f(x)dx = 18.

If y = 2, then ∫f(x)dx = 2x. 18 = 2x gives us x = 9
y = 3, ∫f(x)dx = 3x, x = 6
y = 4, no solution
y = 5, no solution
y = 6, ∫f(x)dx = 6x, x = 3
y = 7, no solution
y = 8, no solution
y = 9, ∫f(x)dx = 9x, x = 2


y = 2, ∫f(x)dx -> x = 9

y = 3, ∫f(x)dx -> x = 6

y = 6, ∫f(x)dx -> x = 3

y = 9, ∫f(x)dx -> x = 2

This gives us 4 cases where we get integer values for a rectangle that has an area of 18.

y = 1, ∫f(x)dx -> x = 7

But, if we solve for ∫f(x)dx = 7, we just end up with unit rectangles. Either the rectangle is 7 x 1, or 1 x 7

y = 7, ∫f(x)dx -> x = 1

What’s funny is that if you look closer at the above cases for 18, you have one prime number (2 or 3) with multiple layers. It’s obvious visually that any rectangle that has a height other than 1 or that specific number is just some multiple of some other prime. Thus, what’s happening when you apply a sieve algorithm to some range of numbers is that you’re just adding another layer to the rectangle (3 x 1, 3 x 2, 3 x 3, 3 x 4, etc., for a rectangle with a width of 3).

I wish I knew where to take this. In a way, it’s the same as for the sinewave approach. If you sum the solutions for sines where sin(2*PI*i/N) = 0, for i = 2 to int(sqrt(N)), primes will have one solution and non-primes will have 2 or more. With the area approach, you’re summing the solutions for i * j = N, where i = 2 to N/2, and j = N / i (i and j are both positive integers). If there are no solutions, then N is prime. If there is at least 1 solution, then you have a non-unit rectangle of area N (same rectangle rotated 90 degrees) and the number is non-prime.

Primes only have unit rectangle solutions.

Same definition, different world.

Advertisements
Previous Post
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: