Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2008-07-23 05:14:48

tony123
Member
Registered: 2007-08-03
Posts: 229

Find all pairs

Find all pairs of positive integers

 

such that

  is a prime

and

  is a perfect square

Offline

#2 2008-07-23 06:19:39

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Find all pairs

All the pairs are generated as follows:

Choose an odd prime, p. Then set a = [(p+1)/2]² and b = [(p-1)/2]².

p is odd, which means p+1 and p-1 are both even. Then dividing them by two leaves integers, and so a and b are both perfect squares. Hence, ab is also a perfect square.

Now, a-b = [(p+1)/2]² - [(p-1)/2]² = [(p² + 2p + 1) - (p² - 2p + 1)]/4 = 4p/4 = p, which was chosen to be prime.

Hence, these values of a and b fit the conditions.



Furthermore, no other pairs exist. For two positive integers to multiply to give a square, they must be of the form a = xy², b = xz². Then you get ab = x²y²z² = (xyz)².

Then a-b = x(y² - z²) = x(y+z)(y-z).
For a-b to be prime, at least two of x, y+z and y-z must equal 1 and the other must be prime.
y+z has a minimum value of 2, which restricts the others to equal one.

Therefore, a and b must themselves be perfect squares and have consecutive square roots. With these restrictions, pairs can be made only using the method above.


Why did the vector cross the road?
It wanted to be normal.

Offline

#3 2008-07-23 22:58:51

ZHero
Real Member
Registered: 2008-06-08
Posts: 1,889

Re: Find all pairs

Impressive work.. mathsyperson!
I'd please like to know "what logic did you apply to start with"??


If two or more thoughts intersect, there has to be a point!

Offline

#4 2008-07-24 01:49:43

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Find all pairs

Thanks!

I kind of worked it out backwards to the way I wrote it there. I started with a = xy² and b = xz² and found what restrictions needed to be placed on x, y, z, then used that to come up with the first part.


Why did the vector cross the road?
It wanted to be normal.

Offline

Board footer

Powered by FluxBB