login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A074074
The numbers D in the set {D :=(2n+1)^2-4m^2, 1<=m<=n} that generate the smallest solution x to x^2 - D*y^2 = 1.
3
5, 21, 33, 17, 105, 105, 189, 33, 105, 405, 333, 141, 473, 57, 817, 189, 325, 885, 77, 1425, 1173, 1925, 1425, 2301, 101, 105, 1425, 333, 777, 1785, 2525, 381, 1785, 405, 141, 3393, 2261, 3813, 6045, 2717, 4389, 3129, 2093, 6765, 885, 5513, 189, 6045, 197, 8085
OFFSET
1,1
COMMENTS
Given a discriminant D, the Pell equation x^2-D*y^2=1 has a minimum solution x as tabulated in A033313. We start with a set of candidates D of the form (2*n+1)^2-(2*m)^2, obviously all odd, where m runs through the integers from 1 to n.
Whichever D out of this set generates the smallest x in A033313, defines a(n)=D.
LINKS
EXAMPLE
For n=4, the candidates are D=77 (m=1, index 69 in A000037), D=65 (m=2, index 57 in A000037), D=45 (m=3, index 39 in A000037) and D=17 (m=4, index 13 in A000037), which produce x = 351, x=129, x=161 and x=33 in that order (apply the offset in A033313 while converting indices from A000037 to find the x). Because 33 is the smallest of these four x, we select the associated D=17 as a(4).
MAPLE
A033313 := proc(Dcap) local c, i, fr, nu, de ; if issqr(Dcap) then -1; else c := numtheory[cfrac](sqrt(Dcap)) ; for i from 1 do try fr := numtheory[nthconver](c, i) ; nu := numer(fr) ; de := denom(fr) ; if nu^2-Dcap*de^2=1 then RETURN(nu) ; fi; catch: RETURN(-1) ; end try; od: fi: end:
A074074 := proc(n) local Dmin, xmin, Dcap ; Dmin := -1 ; xmin := -1; for m from 1 to n do Dcap := (2*n+1+2*m)*(2*n+1-2*m) ; x := A033313(Dcap) ; if xmin = -1 or (x >0 and x<xmin ) then Dmin := Dcap ; xmin := x ; fi; od: Dmin ; end:
seq(A074074(n), n=1..50) ; # R. J. Mathar, Sep 21 2009
MATHEMATICA
a[n_] := Module[{dd, sols, x, y}, dd = Table[(2 n + 1)^2 - 4 m^2, {m, 1, n}]; sols = Table[{d, x /. Solve[x > 0 && y > 0 && x^2 - d y^2 == 1, {x, y}, Integers]}, {d, dd}] /. C[1] -> 1 // Select[#, #[[2]] != {}&]&; MinimalBy[sols, #[[2, 1]]&][[1, 1]]]; Array[a, 50] (* Jean-François Alcover, Oct 23 2023 *)
CROSSREFS
Cf. A074075 (associated m values), A074076.
Sequence in context: A316921 A316423 A317425 * A006309 A273577 A317039
KEYWORD
nonn
AUTHOR
Lekraj Beedassy, Aug 28 2002
EXTENSIONS
Definition clarified, sequence extended beyond a(7) - R. J. Mathar, Sep 21 2009
STATUS
approved