login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033313 Smallest positive integer x satisfying the Pell equation x^2 - D*y^2 = 1 for nonsquare D and positive y. 24
3, 2, 9, 5, 8, 3, 19, 10, 7, 649, 15, 4, 33, 17, 170, 9, 55, 197, 24, 5, 51, 26, 127, 9801, 11, 1520, 17, 23, 35, 6, 73, 37, 25, 19, 2049, 13, 3482, 199, 161, 24335, 48, 7, 99, 50, 649, 66249, 485, 89, 15, 151, 19603, 530, 31, 1766319049, 63, 8, 129, 65, 48842, 33 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000

S. R. Finch, Class number theory [Cached copy, with permission of the author]

H. W. Lenstra, jr., Solving the Pell Equation

F. Richman & R. Mines, Pell's equation

Derek Smith, Historical Overview of Pell Equations

Derek Smith, The Search For An Exhaustive Solution to Pell's Equation

Eric Weisstein's World of Mathematics, Pell Equation

FORMULA

a(n) = sqrt(1 + A000037(n)*A033317(n)^2), or

a(n) = sqrt(1 + (n + floor(1/2 + sqrt(n)))*A033317(n)^2). - Zak Seidov, Oct 24 2013

MAPLE

F:= proc(d) local r, Q; uses numtheory;

  Q:= cfrac(sqrt(d), 'periodic', 'quotients'):

  r:= nops(Q[2]);

  if r::odd then

    numer(cfrac([op(Q[1]), op(Q[2]), op(Q[2][1..-2])]))

  else

    numer(cfrac([op(Q[1]), op(Q[2][1..-2])]));

  fi

end proc:

map(F, remove(issqr, [$1..100])); # Robert Israel, May 17 2015

MATHEMATICA

r[n_] := Reduce[x > 0 && y > 0 && x^2 - n*y^2 == 1, {x, y}, Integers] /. C[_] -> k; sol[n_] := Catch[For[k = 0, True, k++, rn = r[n]; If[rn =!= False, Throw[rn]]]]; A033313 = Reap[For[n = 2, n <= 70, n++, If[! IntegerQ[Sqrt[n]], Sow[x /. ToRules[sol[n]]]]]][[2, 1]](* Jean-François Alcover, Apr 25 2012 *)

CROSSREFS

See A033317 (for y's).

Cf. A000037, A002350.

Sequence in context: A064614 A234747 A016650 * A231442 A319107 A228323

Adjacent sequences:  A033310 A033311 A033312 * A033314 A033315 A033316

KEYWORD

nonn

AUTHOR

Eric W. Weisstein

EXTENSIONS

Offset switched to 1 by R. J. Mathar, Sep 21 2009

Name corrected by Wolfdieter Lang, Sep 03 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 16 23:49 EDT 2019. Contains 325092 sequences. (Running on oeis4.)