login
A077233
a(n) is smallest natural number satisfying Pell equation b^2- d(n)*a^2= +1 or = -1, with d(n)=A000037(n) (nonsquare). Corresponding smallest b(n)=A077232(n).
5
1, 1, 1, 2, 3, 1, 1, 3, 2, 5, 4, 1, 1, 4, 39, 2, 12, 42, 5, 1, 1, 5, 24, 13, 2, 273, 3, 4, 6, 1, 1, 6, 4, 3, 5, 2, 531, 30, 24, 3588, 7, 1, 1, 7, 90, 25, 66, 12, 2, 20, 13, 69, 4, 3805, 8, 1, 1, 8, 5967, 4, 936, 30, 413, 2, 125, 5, 3, 6630, 40, 6, 9, 1, 1, 9, 6, 41, 1122, 3, 21, 53, 2, 165, 120, 1260, 221064, 4, 5, 569, 10, 1, 1, 10, 22419
OFFSET
1,4
COMMENTS
If d(n)=A000037(n) is from A003654 (that is if the regular continued fraction for sqrt(d(n)) has odd (primitive) period length) then the -1 option applies. For such d(n) the minimal b(n) and a(n) numbers for the +1 option are 2*b(n)^2 + 1 and 2*b(n)*a(n), respectively (see Perron I, pp. 94,p5).
For general integer solutions see A077232 comments.
If the trivial solution x=1, y=0 is included, the sequence becomes A006703. - T. D. Noe, May 17 2007
REFERENCES
T. Nagell, "Introduction to Number Theory", Chelsea Pub., New York, 1964, table p. 301.
O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 26, p. 91 with explanation on pp. 94,95).
FORMULA
a(n)=sqrt((A077232(n)^2 - (-1)^(c(n)))/A000037(n)) with c(n)=1 if A000037(n)=A003654(k) for some k>=1 else c(n)=0.
EXAMPLE
d=10=A000037(7)=A003654(3), therefore a(7)=1 and b(7)=A077232(7)=3 give 3^2=10*1^2 -1 and 2*b(7)^2+1=19 and 2*b(7)*a(7)=2*3*1=6 satisfy 19^2 - 10*6^2 = +1.
d=11=A000037(8) is not in A003654, therefore there is no (nontrivial) solution of the b^2 - d*a^2 = -1 Pell equation and a(8)=3 and b(8)=A077232(8)=10 satisfy 10^2 - 11*3^2 = +1. See A077232 for further examples.
MATHEMATICA
nmax = 500;
nconv = 200; (* The number of convergents 'nconv' should be increased if the linear recurrence is not found for some terms. *)
nonSquare[n_] := n + Round[Sqrt[n]];
b[n_] := b[n] = Module[{lr}, lr = FindLinearRecurrence[ Numerator[ Convergents[ Sqrt[nonSquare[n]], nconv]]]; (1/2) SelectFirst[lr, #>1&]];
a[n_] := If[n == 1, 1, SelectFirst[{Sqrt[(b[n]^2 - 1)/nonSquare[n]], Sqrt[(b[n]^2 + 1)/nonSquare[n]]}, IntegerQ]];
Table[Print[n, " ", a[n]]; a[n], {n, 1, nmax}] (* Jean-François Alcover, Mar 10 2021 *)
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Wolfdieter Lang, Nov 08 2002
STATUS
approved