Someone asked on [MSE about an upper bound][1] for $x$ in $x^2 - p y^2 = 1,$ when $p$ is prime. I checked, it appears reasonable to guess that $$ x < p^{\sqrt p} $$ when $p > 2.$ I had the computer solve by Lagrange's method, no continued fractions, no decimal accuracy required, no memory required, but the method is still elementary. I had the machine print out whenever $\log_p(\log_p(x))$ increased. It was necessary to take $p > 2$ because $x=3$ gives an overly large logarithm. Meanwhile, if all we do is print whenever $x$ itself increases, there are several composite numbers below $100$ that get included, after that they give way to primes $p \equiv 1 \pmod 4.$ So, the questions would be, (I) what is unconditionally proved about the size of $x,$ (II) what is proved under conjectures that people mostly believe true, (III) what are the most optimistic things conjectured? p 5 log_p(x) 1.365212388971971 log_p(log_p(x)) 0.1934277864616169 X 9 13 log_p(x) 2.524585016802303 log_p(log_p(x)) 0.3610506760085375 X 649 61 log_p(x) 5.17947382679923 log_p(log_p(x)) 0.4000860954668999 X 1766319049 109 log_p(x) 6.969012778576543 log_p(log_p(x)) 0.4138413148682316 X 158070671986249 421 log_p(x) 12.79922341582056 log_p(log_p(x)) 0.4218996203501611 X 3879474045914926879468217167061449 1621 log_p(x) 23.61505725662223 log_p(log_p(x)) 0.4278136548619654 X 6298101812493732343034974500091457815529942308667051412857352310169665125001 ..................... 44450701 log_p(x) 2641.408511213517 log_p(log_p(x)) 0.4474228404332914 X is rather large... Why not, here is how it begins if we print every time $x$ increases and make no requirement about loglog, taking $x^2 - n y^2$ with $2 \leq n \leq 500$ 2 log_p(x) 1.584962500721156 log_p(log_p(x)) 0.6644487074538893 X 3 5 log_p(x) 1.365212388971971 log_p(log_p(x)) 0.1934277864616169 X 9 10 log_p(x) 1.278753600952829 log_p(log_p(x)) 0.1067868696893203 X 19 13 log_p(x) 2.524585016802303 log_p(log_p(x)) 0.3610506760085375 X 649 29 log_p(x) 2.729264122987999 log_p(log_p(x)) 0.298171610554983 X 9801 46 log_p(x) 2.637925539730376 log_p(log_p(x)) 0.2533517055829028 X 24335 53 log_p(x) 2.79606031271967 log_p(log_p(x)) 0.258976271165875 X 66249 61 log_p(x) 5.17947382679923 log_p(log_p(x)) 0.4000860954668999 X 1766319049 109 log_p(x) 6.969012778576543 log_p(log_p(x)) 0.4138413148682316 X 158070671986249 181 log_p(x) 8.146702019142648 log_p(log_p(x)) 0.4035037766708247 X 2469645423824185801 277 log_p(x) 8.271023203635528 log_p(log_p(x)) 0.3756670785256742 X 159150073798980475849 397 log_p(x) 8.05129073299257 log_p(log_p(x)) 0.3485719633766078 X 838721786045180184649 409 log_p(x) 8.576275777667302 log_p(log_p(x)) 0.3573497754649824 X 25052977273092427986049 421 log_p(x) 12.79922341582056 log_p(log_p(x)) 0.4218996203501611 X 3879474045914926879468217167061449 [1]: http://math.stackexchange.com/questions/1611411/pell-equations-upper-bound/1612474#1612474