Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

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

  • 0

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 by Chuck
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...