April 27, 2009

As fun as Richey Numbers are, it's time to move on.

I've come up with an unusual puzzle to get me back on the random-math track. It's a problem that stumped me through all of 10th grade English class, the year I formally learned of Polar Graphing. I was curious about the graph of r = Θ, which takes the form of a spiral. On the interval [0, π/2] the graph hits a maximum x value. We have the points (x,y) = (0,0) and (0, π/2), but in between there the graph is an unusual curve in the first quadrant. I asked, what was the maximum x value the graph hits in that interval?

I had no idea how to solve it at first. I asked numerous math teachers, and those who didn't completely ignore me weren't sure what to do. This year I'm in Calculus AB, and in light of a recent unit regarding Optimization I was struck with an idea.

We have the relationships between Polar and Cartesian coordinates that x^2+y^2 = r^2, and tan Θ = y/x. The function says that r = Θ, so

x^2 + y^2 = Θ^2

Also,

xtan Θ = y => x^2 tan^2(Θ) = y^2, so

x^2 + x^2 tan^2 (Θ) = Θ^2

x^2(1+tan^2 (Θ)) = Θ^2

Since 1+tan^2 (Θ) = sec^2 (Θ),

x^2 = Θ^2 cos^2 (Θ)

x = Θ cosΘ

Now we have a simple relationship relating x and theta. All we need to do is differentiate and find where the maximums and minimums occur on Θ ε [0, π/2].

dx/dΘ = cos Θ - Θ sin Θ

Θ = cot Θ, a problem best left to the calculator. Approximately, Θ = .86033, and x = Θ cos Θ = .56110.

The maximums in x and y in any interval can be found using the same method; they are the solutions to the equations Θ = cot Θ and Θ = tan Θ, respectively. I have yet to try this out on other polar functions.

March 14, 2009

Richey Numbers- New Beginnings

I have finalized my findings on Richey Numbers, numbers that can be written in a certain number of ways as the sum of two squares. As it turns out, I was right before, though the specifics were a little off.

A formula I had read about some time ago in Paul J. Nahin's An Imaginary Tale says that any number (x^2+y^2)(u^2+v^2) can always be written as the sum of two squares in two different ways. I overlooked it, thinking it was just a formula for generating 2nd order Richey Numbers- now I realize that it is the formula that generates all Richey Numbers, and is very closely related to the one I came up with, which generates some Richey Numbers.

Since N = (x^2+y^2)(u^2+v^2), we can algebraically re-write the product on the RHS as the sum of two squares, in two different ways, as such:

(x^2+y^2)(u^2+v^2) = (xu+yv)^2 + (xv-yu)^2 = (xv+yu)^2+(xu-yv)^2

(By the way, some mathematician didn't sit thinking about the product on the left for hours on end until he came up with a way to re-write it; there is a method involving complex numbers that Nahin presents in his book. Unfortunately I don't have it right now- the method is interesting though, and I will post it when I get the book back.)

You can also check the algebra out by yourself if you don't believe me.

As for the general nth case Richey Numbers- numbers that can be written in n ways as the sum of two squares- I came to some new conclusions. 1st order Richey Numbers consist of three sets- first, all the primes that aren't of the form 4k+3, i.e. those that are of the form 4k+0, 4k+1 or 4k+2. These are 2 and all those of 4k+1, since there are no primes of the form 4k+0 and 2 is the only one of the form 4k+2. Some examples of these are 5, 13, 17, 29, and 37. You can check that these can be written in exactly one way as the sum of two squares.

Second, the set of integers 2^(2a+1) for some a. This expression can algebraically be re-written as 2^(2n) + 2^(2n), which is the sum of two squares. These numbers include 2, 8, 32, 128...

The last set is the some of the numbers within set of positive integers whose prime factorizations contain only primes from the first set, and only one prime of the form 4k+1. For example, 10 = (2)(5); since both 2 and 5 are primes that aren't of the form 4k+3 10 can be written as the sum of two squares, as 10 = 9+1. 15 = (3)(5) cannot be written as the sum of two squares because 3 is a prime of the form 4k+3.

I have conjectured that the numbers that can be written as the sum of two squares in more than one way are those that contain two or more different factors that are primes of the form 4k+1. For example, 26 = (2)(13) = 25+1 can only be written in exactly one way as the sum of two squares because it only has one factor of the form 4k+1, namely 13. 130 = 2(5)(13) = 121+9 = 81+49 can be written in two ways as the sum of two squares because it has two factors of the form 4k+1, in this case both 5 and 13.

I have yet to look into numbers that can be written in three or four or five ways as the sum of two squares, though in writing my C++ program for this problem some time ago I did notice (after preforming some trial runs) that the prime factorizations of the higher-order Richey Numbers seem to be closely related to earlier order Richey Numbers, just as 2nd order Richey Numbers are closely related to 1st order ones. (For those who know C++ programming, my code checks how many ways a given integer can be written as the sum of two squares, a variable I denoted n. I was making use of it to check for numbers where n=2, but the code can easily be transformed to look for other values of n.)

Having just looked a little further into the matter now, as an early hypothesis it appears that an nth order Richey Number is always the product of n prime factors of the form 4k+1, though I have yet to algebraically show this.

February 17, 2009

Richey Numbers- Solved at Last

A Quick Reminder: Richey Numbers are positive integers that can be written as the sum of two squares in exactly two ways, that is

N = a^2+b^2 = c^2+d^2

for a or be not equal to c or d.

I concluded that any number of the form (4m+1)(4k+1) is a Richey Number for m,k>0, 4m+1 and 4k+1 both prime. One of my earlier ill-formed conjectures that held me back, the assumption that any number of the form 5^h for h>1 is a Richey Number, proved to be wrong when h=5. It still poses a problem though- 125 and 625 don't fit into the rule I came up with.

In any event, the formula stated above accounts for almost all the Richey Numbers; almost every Richey Number is of that form, and almost every number of that form is a Richey Number. NOTE: This refers only to "pure" Richey Numbers; non-pure Richey Numbers arise when you take a "pure" one, one whose prime factorization is (4m+1)(4k+1) for 4m+1 and 4k+1 both prime, and multiply it by 2 or by some square number. These still have the properties of a Richey Number, but are simply multiples of "pure" Richey Numbers. For example, 130 is a non-pure Richey Number: it is (2)(65) = (2)(5)(13).

My next problem looks at a very similar kind of equation. I haven't determined a name for it yet, but here's the problem:

Find solutions in positive integers a,b,c, and d such that

a^2 = b^2 + c^2 + d^2.

This is essentially an extension of Pythagorean triples- I figured that eventually I could generalize the problem to one of this form:

Sum[i=0, k]{a[i]^2} = x^2

that looks for solutions in x, a[i] integers.