Sunday, April 20, 2014

2014/038) Find any/all 6 digit numbers that are squares given the condition that the last 3 digits is 1 more than the first 3 digits.

Let the 3 digit number be x
Now we have x writing to the right and add 1 we get the value
1001x + 1 = y^2
So 1001 x = y^2 -1 = (y-1)(y+1)
Or 7 .11.13 x = (y-1) (y+ 1)
Let x factor into ab
So 7.11.13 ab = (y-1)(y+1)
This gives rise to 6 cases
1) 7a = y- 1, 11.13 b = y+1
2) 7a = y+ 1, 11.13 b = y-1
3) 11a = y- 1,7.13 b = y+1
4) 11a = y+ 1, 7.13 b = y-1
5) 13a = y- 1, 7.13 b = y+1
6) 13a = y+ 1, 7.13 b = y-1
Using Chinese remainder theorem and modular arithmetic we can solve these and get solution and as 7 * 11 * 13 > 1000 we shall get not more than one solution in each set
I shall solve one and let others solve the rest
Say 7 a = y-1 and 11.13b = y+1
Let y = z + 1
7a = z and 143b = z + 2 => 3b = 2 taking mod 7
b =3 or z = 143 * 3 – 2=>y = 428
this gives a = 61 or x = 183
so we get 183184 = 428^2
similarly we get 5 more 3 digit for x solutions
024025 = 155^2
075076= 274^2
183184= 428^2
328329=573^2
528529= 727^2
715716= 846^2
The 1st 2 solutions to be removed as they are 5 digit numbers. So rest 4 are solutions

No comments: