I would like to find the highest number of the form $a + b\sqrt{2}$ less than a given value, where $a$ and $b$ are nonnegative integers. For example, if the value was $8.4$, then just trying all possible combinations less than $8.4$ would yield $a = 4$ and $ b = 3$, as $4+3\sqrt{2} = 8.243$, and no other values of $a$ and $b$ yield a value closer to $8.4$, but still less than $8.4$.
2026-03-27 22:03:45.1774649025
Highest value expressed as $a + b\sqrt{2}$ less than a given value
73 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
Since $a$ is an integer, we only need to find an integer $b$ such that the fractional part of $b\sqrt{2}$ is closest to the fractional part of $8.4$. Now it is easy to see that we obtain $b=3$, since we have the additional restriction that $b<8$. In general, the fractional part of $n\sqrt{2}$ is dense in $[0,1]$, for $n\in \Bbb N$.