6
$\begingroup$

Suppose I had $n = a + \sqrt{b}$ as a decimal of arbitrary precision, but didn't know $a$ or $b$, except that they are positive integers.

If I had just $\sqrt{b}$, I could just square it and end up with something very close to an integer, so I'd have $b$.

If I take $n^2 - 2an$, I get $(a^2 + b + 2a\sqrt{b}) - (2a^2 + 2a\sqrt{b}) = b - a^2$ which will be an integer, but I don't have $a$...

Is there some way to take the sum of the integral and decimal portion of $n$ and do some integer voodoo there?

Thanks for any ideas.

  • 0
    What does it mean to know something "as a decimal of arbitrary precision"?2012-11-26
  • 0
    Just that I can acquire it, perhaps through Newton's method, to any place value. For example 5+sqrt(3) = 6.7320508.... and I can keep going.2012-11-26
  • 0
    Could you give us an explicit $n$ that you have in mind?2012-11-26
  • 2
    What about $n = 3 = 2 + \sqrt{1} = 1 + \sqrt{4}$? Do you assume that $b$ is not a square?2012-11-26

4 Answers 4