Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@mathworker21 For $x = \sqrt{2}$, one finds the solutions $(p,q) = (3,2)$, $(p,q) = (7,5)$, $(p,q) = (41,29)$, $(p,q) = (63018038201,44560482149)$ and $(p,q) = (19175002942688032928599,13558774610046711780701)$, and there is a chance that these are all (if there are more, $p$ and $q$ have more than $1000$ decimal digits).
Numerical experimentation suggests that e.g. for the square root of 2, there is only a small finite number of pairs of primes which work, which is supported by heuristics.
Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on MathOverflow Meta, or in MathOverflow Chat. Comments continuing discussion may be removed.
Please be aware that every edit of a question or of one of its answers bumps the thread to the front page. This has happened for this thread already about 20 times in just a few days, and this is a nuisance for other users. Please refrain from unnecessary edits to your posts.
Please be aware that every edit of a question or of one of its answers bumps the thread to the front page. This has happened for this thread already more than 20 times in just a few days, and this is a nuisance for other users. Please refrain from unnecessary edits to your posts.