Friday 15 April 2016

number theory - Given $a + sqrt{b}$ with positive integer $a,b$, find $a$ and $b$?

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.

No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...