OFFSET
1,1
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..10000
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
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]}]; Table[ PellSolve[ Prime[n]][[1]], {n, 35}] (* Robert G. Wilson v, Jul 22 2005 *)
f[n_] := Block[{p = Prime[n]}, FindInstance[x^2 == p*y^2 + 1 && x > 0 && y > 0, {x, y}, Integers][[1, 1, 2]]]; Array[f, 40] (* Robert G. Wilson v, Nov 16 2012 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
N. J. A. Sloane, Apr 18 2003
EXTENSIONS
a(8) - a(35) from Robert G. Wilson v, Jul 22 2005
STATUS
approved