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 A003654 M1366 N0529 #49 Feb 27 2023 19:21:26 %S A003654 2,5,10,13,17,26,29,37,41,53,58,61,65,73,74,82,85,89,97,101,106,109, %T A003654 113,122,130,137,145,149,157,170,173,181,185,193,197,202,218,226,229, %U A003654 233,241,257,265,269,274,277,281,290,293,298,313,314,317,337,346,349,353,362 %N A003654 Squarefree integers m such that the fundamental unit of Q(sqrt(m)) has norm -1. Also, squarefree integers m such that the Pell equation x^2 - m*y^2 = -1 is soluble. %C A003654 The squarefree elements of A003814 and A172000. - _Max Alekseyev_, Jun 01 2009 %C A003654 Together with {1} and A031398 forms a disjoint partition of A020893. That is, A020893 = {1} U A003654 U A031398. - _Max Alekseyev_, Mar 09 2010 %C A003654 Squarefree integers m such that Q(sqrt(m)) contains the infinite continued fraction [k, k, k, k, k, ...] for some positive integer k. For example, Q(sqrt(5)) contains [1, 1, 1, 1, 1, ...] which equals (1 + sqrt(5))/2. - _Greg Dresden_, Jul 23 2010 %D A003654 D. A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989, pp. 224-241. %D A003654 M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 46. %D A003654 D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 56. %D A003654 W. Paulsen, Calkin-Wilf sequences for irrational numbers, Fib. Q., 61:1 (2023), 51-59. %D A003654 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A003654 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A003654 R. J. Mathar, <a href="/A003654/b003654.txt">Table of n, a(n) for n = 1..9446</a> %H A003654 S. R. Finch, <a href="http://www.people.fas.harvard.edu/~sfinch/">Class number theory</a> %H A003654 Steven R. Finch, <a href="/A000924/a000924.pdf">Class number theory</a> [Cached copy, with permission of the author] %H A003654 P. Seeling, <a href="https://www.digitale-sammlungen.de/de/view/bsb10593912?page=54,55">Ueber die Aufloesung der Gleichung x^2-Ay^2=+-1 in ganzen Zahlen, wo A positiv und kein vollstaendiges Quadrat sein muss</a>, Archiv der Mathematik und Physik, Vol. 52 (1871), p. 40-49. %p A003654 isA003654 := proc(n) %p A003654 local cf,p ; %p A003654 if not numtheory[issqrfree](n) then %p A003654 return false; %p A003654 end if; %p A003654 for p in numtheory[factorset](n) do %p A003654 if modp(p,4) = 3 then %p A003654 return false; %p A003654 end if; %p A003654 end do: %p A003654 cf := numtheory[cfrac](sqrt(n),'periodic','quotients') ; %p A003654 type( nops(op(2,cf)),'odd') ; %p A003654 end proc: %p A003654 A003654 := proc(n) %p A003654 option remember; %p A003654 local a; %p A003654 if n = 1 then %p A003654 2; %p A003654 else %p A003654 for a from procname(n-1)+1 do %p A003654 if isA003654(a) then %p A003654 return a; %p A003654 end if; %p A003654 end do: %p A003654 end if; %p A003654 end proc: %p A003654 seq(A003654(n),n=1..40) ; # _R. J. Mathar_, Oct 19 2014 %t A003654 Reap[For[n = 2, n < 1000, n++, If[SquareFreeQ[n], sol = Solve[x^2 - n y^2 == -1, {x, y}, Integers]; If[sol != {}, Sow[n]]]]][[2, 1]] (* _Jean-François Alcover_, Mar 24 2020 *) %Y A003654 Cf. A031396, A031397, A003814, A249021. %K A003654 nonn %O A003654 1,1 %A A003654 _N. J. A. Sloane_, _Mira Bernstein_. Entry revised by _N. J. A. Sloane_, Jun 11 2012 %E A003654 Edited by _Max Alekseyev_, Mar 17 2010