Guest Posted September 18, 2009 Report Share Posted September 18, 2009 Determine all possible value(s) of a ten digit perfect square X such that the number formed by the first five digits and the number formed by the last five digits are consecutive. Note: X cannot contain any leading zero. Quote Link to comment Share on other sites More sharing options...
0 Guest Posted September 18, 2009 Report Share Posted September 18, 2009 (edited) So such a desired number will take the form 100001k +/- 1, where k is an integer in the set {10000,10001,10002,...,99999}. Of course, the last case, k=99999, only goes one direction (9,999,999,998, since 99,999,100,000 doesn't really work). First of all, suppose that 100001k + 1 is a square. Then... 100001k + 1 = n2 100001k = (n+1)(n-1) 11*9091*k = (n+1)(n-1) = m(m+2), where k, n, and m are integers. I arbitrarily substituted m = n-1 to make a point. Note that m(m+2) now equals 11*9091*k. 9091 is a prime, and both m and k need to be integers. That said, we know that 11k = 9093 or 11k = 9089. Neither of these will work, so this case is impossible. Suppose now that 100001k - 1 is a square. I don't have an immediate way to prove that no case exists, and I don't have a compiler handy, so just take this java code and run it, and it should give you all of the answers (or no answer at all, which would indicate that no desired number exists): public static void main(String[] args) { int solutions = 0; for (int i=10000;i<100000;i++) { int number = 100001*i - 1; int tester = Math.sqrt(number); if (Math.pow(tester,2) == number) { solutions++; System.out.println("Solution found: " + number); } } System.out.println(solution + " solution(s) found."; } Edited September 18, 2009 by Chuck Quote Link to comment Share on other sites More sharing options...
0 Guest Posted September 18, 2009 Report Share Posted September 18, 2009 1322413225 = 36365^2 4049540496 = 63636^2 13224 and 13225 are consecutive. 40495 and 40496 are consecutive. Quote Link to comment Share on other sites More sharing options...
0 Guest Posted September 18, 2009 Report Share Posted September 18, 2009 (edited) 5 lines in python, takes 0.489 seconds for k in range(10000,99999): s = int(str(k)+str(k+1)); q = s**0.5; if q == int(q): print s, '=',str(int(q))+'^2'; Edited September 18, 2009 by mmiguel1 Quote Link to comment Share on other sites More sharing options...
Question
Guest
Determine all possible value(s) of a ten digit perfect square X such that the number formed by the first five digits and the number formed by the last five digits are consecutive.
Note: X cannot contain any leading zero.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.