This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A006705 M0398 #32 Oct 29 2023 21:17:50 %S A006705 0,1,1,0,1,2,3,1,0,1,3,1,1,4,1,0,1,4,39,1,1,42,5,1,0,1,5,3,1,2,273,1, %T A006705 4,6,1,0,1,6,4,1,5,2,531,3,1,3588,7,1,0,1,7,5,1,66,12,2,20,13,69,1,5, %U A006705 8,1,0,1,8,5967,1,3,30,413,2,125,5,3,39,1,6,9,1,0,1,9,6,1,1122,3,21,53 %N A006705 Solution to Pellian: y such that x^2 - n y^2 = +- 1, +- 4. %C A006705 When n is a square, the trivial solution (x,y) = (1,0) is taken; otherwise we take the least nontrivial solution that satisfies one of the four equations with +1, -1, +4 or -4. - _Ray Chandler_, Aug 22 2015 %D A006705 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. %D A006705 C. F. Degen, Canon Pellianus. Hafniae, Copenhagen, 1817. %D A006705 D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 55. %D A006705 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006705 Ray Chandler, <a href="/A006705/b006705.txt">Table of n, a(n) for n = 1..10000</a> (first 150 terms from Robert G. Wilson v) %H A006705 A. Cayley, <a href="/A002349/a002349.pdf">Report of a committee appointed for the purpose of carrying on the tables connected with the Pellian equation ...</a>, Collected Mathematical Papers. Vols. 1-13, Cambridge Univ. Press, London, 1889-1897, Vol. 13, pp. 430-443. (Annotated scanned copy) %t A006705 r[x_, n_] := Reduce[lhs = x^2 - n*y^2; y > 0 && (lhs == -1 || lhs == 1 || lhs == -4 || lhs == 4), y, Integers]; a[n_ /; IntegerQ[Sqrt[n]]] = 0; xx[n_ /; IntegerQ[Sqrt[n]]] = 1; a[n_] := (x = 1; While[r[x, n] === False, x++]; xx[n] = x; y /. ToRules[r[x, n]]); A006705 = Table[yn = a[n]; Print[{n, xx[n], yn}]; yn, {n, 1, 65}] (* _Jean-François Alcover_, Mar 08 2012 *) %Y A006705 Cf. A006704. %K A006705 nonn,easy,nice %O A006705 1,6 %A A006705 _N. J. A. Sloane_ %E A006705 3 terms corrected by _Jean-François Alcover_, Mar 09 2012 %E A006705 Extended by _Ray Chandler_, Aug 22 2015