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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002349 Take solution to Pellian equation x^2 - n*y^2 = 1 with smallest positive y and x >= 0; sequence gives a(n) = y, or 0 if n is a square. A002350 gives values of x.
(Formerly M0046 N0015)
21
0, 2, 1, 0, 4, 2, 3, 1, 0, 6, 3, 2, 180, 4, 1, 0, 8, 4, 39, 2, 12, 42, 5, 1, 0, 10, 5, 24, 1820, 2, 273, 3, 4, 6, 1, 0, 12, 6, 4, 3, 320, 2, 531, 30, 24, 3588, 7, 1, 0, 14, 7, 90, 9100, 66, 12, 2, 20, 2574, 69, 4, 226153980, 8, 1, 0, 16, 8, 5967, 4, 936, 30, 413, 2, 267000, 430, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

REFERENCES

Albert H. Beiler, "The Pellian" (chap 22), Recreations in the Theory of Numbers, 2nd ed. NY: Dover, 1966.

A. Cayley, Report of a committee appointed for the purpose of carrying on the tables connected with the Pellian equation ..., Collected Mathematical Papers. Vols. 1-13, Cambridge Univ. Press, London, 1889-1897, Vol. 13, pp. 430-443.

C. F. Degen, Canon Pellianus. Hafniae, Copenhagen, 1817.

D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55.

N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

E. E. Whitford, The Pell Equation.

LINKS

T. D. Noe and Ray Chandler, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)

A. Cayley, Report of a committee appointed for the purpose of carrying on the tables connected with the Pellian equation ..., Collected Mathematical Papers. Vols. 1-13, Cambridge Univ. Press, London, 1889-1897, Vol. 13, pp. 430-443. (Annotated scanned copy)

L. Euler, De solutione problematum diophanteorum per numeros integros, par. 17.

N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)

E. E. Whitford, The Pell equation, New York, 1912.

EXAMPLE

For n = 1, 2, 3, 4, 5 solutions are (x,y) = (1, 0), (3, 2), (2, 1), (1, 0), (9, 4).

MATHEMATICA

a[n_] := If[IntegerQ[Sqrt[n]], 0, For[y=1, !IntegerQ[Sqrt[n*y^2+1]], y++, Null]; y]

PellSolve[(m_Integer)?Positive] := Module[{cf, n, s}, cof = ContinuedFraction[ Sqrt[m]]; n = Length[ Last[cof]]; 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]; Table[ f[n], {n, 0, 75}]

CROSSREFS

Cf. A002350, A006702, A006703, A006704, A006705. See A033316, A033315, A033319 for records.

Sequence in context: A062173 A004558 A129699 * A096794 A106375 A194734

Adjacent sequences:  A002346 A002347 A002348 * A002350 A002351 A002352

KEYWORD

nonn,nice,easy

AUTHOR

N. J. A. Sloane

EXTENSIONS

More terms from Enoch Haga, Mar 14 2002

Better description from Robert G. Wilson v, Apr 14 2003

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 August 19 04:02 EDT 2019. Contains 326109 sequences. (Running on oeis4.)