A little puzzle

18 views
Skip to first unread message

Jeremy Weissmann

unread,
Dec 2, 2010, 3:21:28 PM12/2/10
to calculationa...@googlegroups.com
Here is a little puzzle for you all to think about. I had a lot of fun exploring it.

For which positive integers k do there exist two perfect squares that differ by k ?

In symbols: Given positive integer k , when are there natural solutions to the following equation:

(a,b) : a^2 + k = b^2 ?

If a solution exists, is it unique? If not, are there finitely many solutions? If so, is there an easy way to determine all solutions? If there are infinitely many, is there an algorithm to compute all solutions?

Etc.

+j

Mohit Thatte

unread,
Dec 2, 2010, 5:20:29 PM12/2/10
to calculationa...@googlegroups.com
Hey Jeremy, 

Some thoughts: 

a,b,k are all positive integers. Given k, we solve for a and b. 

1.           a^2 + k = b^2 ,
    k = b^2 - a^2 
    k = (b-a)(b+a) ............ equation 1

2. From the nature of the right hand side of equation 1, we can conclude that  a!=b and a < b

3. Next, we analyze the equation based on the parity of a and b. The cases: 
 
3.1 a and b have the same parity
Both b+a and b-a are even, leading us to the conclusion that  k = 4j, for some positive integer j

3.2 a and b have different parity 
Both b+a, b-a are odd, therefore k is an odd number of the form 2j + 1 

3.1 and 3.2 represent the class of k that have a solution. 

Therefore, given k, if you establish that it is NOT of the form 2j+1 or 4j, for some positive integer j, we conclude that there is NO solution. 

Else, follow step 4 onwards:

4. Suppose k is of the form 4j 
This can only happen when a,b are of the same parity. So, we break it down again:
4.1 Both a, b are even
b = 2m, a=2n , for some m, n > 0

b^2 - a^2 = 4(m^2-n^2) = k = 4j

Or, j = m^2-n^2 , which brings us back to equation 1 with m,n, j  as parameters, so call algorithm recursively.

4.2 Both a,b are odd
b = 2m+1, a = 2n+1
b^2 - a^2 = 4(m-n)(m+n+1) = 4j 
j = m^2 - n^2 + m - n 
j = m(m+1) - n(n+1)         ..... (stuck)

5. Suppose k is of the form 2j+1
5.1 b is odd, a is even
b=2m+1, a=2n 
2j + 1 = 4m^2 + 4m + 1 - 4n^2
2j + 1 = 4(m^2+m - n^2) +1
j = 2 ( m(m+1) - n^2) 
So j must be even, or k must be of the form 4r +1 

5.2 b is even, a is odd
b=2m, a=2n+1
2j+1 = 4m^2 - 4n^2 - 4n - 1
j = 2 (2m^2 - 2n^2 - 2n -1)
So j must be even, or k must be of the form 4r +1 



Thats as far as I can go now. But I'm trying to see if analyzing k modulo 4, leads someplace. 

Cheers and g'night
~Mohit

--
You received this message because you are subscribed the mathmeth.com mailing list.
To unsubscribe from this group, send email to Calculational-Math...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Calculational-Mathematics?hl=en



--
-Mohit Thatte

Reply all
Reply to author
Forward
0 new messages