OFFSET
-1,1
MATHEMATICA
$MaxExtraPrecision = 512; PellSolve[(m_Integer)?Positive] := Module[{cf, n, s}, cf = ContinuedFraction[ Sqrt[m]]; n = Length[ Last[cf]]; If[ OddQ[n], n = 2*n]; s = FromContinuedFraction[ ContinuedFraction[ Sqrt[ m], n]]; {Numerator[s], Denominator[s]}]; f[n_] := If[ ! IntegerQ[ Sqrt[ n]], PellSolve[n][[2]], 0]; t = Table[0, {20}]; Do[a = Floor[ Log[2, Log[2, f[n]]]]; If[a < 20 && t[[a - 1]] == 0, t[[a - 1]] = n; Print[{a, n}]], {n, 10^7}]
CROSSREFS
KEYWORD
hard,nonn
AUTHOR
Robert G. Wilson v, Oct 02 2004
STATUS
approved