Friday, September 25, 2009

Prime time

Show that any odd prime can be written as the difference of the squares of two integers.

Labels:

9 Comments:

Anonymous Wizard of Oz said...

a^2 - b^2 = (a+b)(a-b)
How can this be a prime?

September 25, 2009 11:03 PM  
Anonymous Vishav_011 said...

4^2 - 3^2 = 7
i.e
16 - 9 = 7(odd prime number)

September 26, 2009 1:41 AM  
Blogger Chris said...

Hi Wiz. That's the question :)

Hi Vishav_011. Thanks, for the sample. Was that a teaser, or do you know the general result?

September 26, 2009 4:33 AM  
Anonymous Wizard of Oz said...

Good one, Vishav. I stupidly missed the obvious case where a = b+1. Then a^2-b^2 = 2b+1.
So, as b increases from 1, then all the odd numbers are covered, not just the primes.
I'll have to learn to stop and think a bit more and not rush in when I see 0 comments and try to get in first!

September 26, 2009 4:46 AM  
Blogger quantense said...

Hi Chris, I think this works. If b is a prime number, a is some number we to determine bellow, require
(a+b)^2-a^2=b, hence a=0.5(1-b). Because b is prime, it can't be even (why you say it's odd?), therefore 1-b is even and is divided by 2. Your integers are 0.5(1+b) and 0.5(1-b)

September 26, 2009 7:02 AM  
Blogger quantense said...

If b is not 2, of course. I have no questions to you any more, Chris.

September 26, 2009 7:03 AM  
Blogger Chris said...

Well done everyone. As Wiz pointed out, any odd number can be represented as the difference of two squares.

Quantense actually came up with the solution I was going to give. I had to say odd primes as 2 (the only even prime) cannot be represented that way.

Just cover it completely:
Let o be any odd number. Let a=(o+1)/2 and b=(o-1)/2.
Then a²-b² = (o²+2o+1)/4 - (o²-2o+1)/4 = 4o/4 = o.

What's more, if f is any number exactly divisible by 4, then:
Let a=(f+4)/4 and b=(f-4)/4 => f=a²-b².

In both cases I'm allowing 0 as a square. If you're not happy with that, that only gives a minor mod to the initial assertions.

September 26, 2009 7:33 AM  
Blogger Chris said...

Hi quantense, our posts crossed again.

September 26, 2009 7:34 AM  
Blogger Chris said...

Hi quantense. I've just deleted the Magnetism blog. I doubt that I could easily disagree with anything that Richard Feynman said.

September 27, 2009 12:31 PM  

Post a Comment

Links to this post:

Create a Link

<< Home