OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
EXAMPLE
For n=3, p = 11, x=10, y=3 since we have 10^2 = 11*3^2 + 1, so a(3) = 10.
MATHEMATICA
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]}]; Transpose[ PellSolve /@ Select[ Prime[ Range[72]], Mod[ #, 4] == 3 &]][[1]] (* Robert G. Wilson v, Sep 02 2004 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
N. J. A. Sloane, Apr 18 2003
EXTENSIONS
More terms from Robert G. Wilson v, Sep 02 2004
STATUS
approved