login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #24 Oct 23 2023 09:55:44

%S 5,21,33,17,105,105,189,33,105,405,333,141,473,57,817,189,325,885,77,

%T 1425,1173,1925,1425,2301,101,105,1425,333,777,1785,2525,381,1785,405,

%U 141,3393,2261,3813,6045,2717,4389,3129,2093,6765,885,5513,189,6045,197,8085

%N 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.

%C 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.

%C Whichever D out of this set generates the smallest x in A033313, defines a(n)=D.

%H Ray Chandler, <a href="/A074074/b074074.txt">Table of n, a(n) for n = 1..499</a>

%e 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).

%p 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:

%p 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:

%p seq(A074074(n),n=1..50) ; # _R. J. Mathar_, Sep 21 2009

%t 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 *)

%Y Cf. A074075 (associated m values), A074076.

%K nonn

%O 1,1

%A _Lekraj Beedassy_, Aug 28 2002

%E Definition clarified, sequence extended beyond a(7) - _R. J. Mathar_, Sep 21 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 06:58 EDT 2024. Contains 371906 sequences. (Running on oeis4.)