[go: up one dir, main page]

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!)
Search: a033318 -id:a033318
Displaying 1-3 of 3 results found. page 1
     Sort: relevance | references | number | modified | created      Format: long | short | data
A033314 Least D in the Pellian x^2 - D*y^2 = 1 for which x has least solution n. +10
8
3, 2, 15, 6, 35, 12, 7, 5, 11, 30, 143, 42, 195, 14, 255, 18, 323, 10, 399, 110, 483, 33, 23, 39, 27, 182, 87, 210, 899, 60, 1023, 17, 1155, 34, 1295, 38, 1443, 95, 1599, 105, 1763, 462, 215, 506, 235, 138, 47, 96, 51, 26, 2703, 78, 2915, 21, 3135, 203, 3363 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
The i-th solution pair V(i) = [x(i), y(i)] to the Pellian x^2 - D*y^2 = 1 for a given least solution x(1) = n may be generated through the recurrence V(i+2) = 2*n*V(i+1) - V(i) taking V(0) = [1, 0] and V(1) = [n, sqrt((n^2-1)/a(n))]. V(i) stands for the numerator and denominator of the 2i-th convergent of the continued fraction expansion of sqrt(D).
Thus setting n = 3, for instance, we have D = a(3) = 2 and V(1) = [3, 2] so that along with V(0) = [1, 0] recurrence V(i+2) = 6*V(i+1) - V(i) generates [A001333(2k), A000129(2k)]. Similarly, setting n = 9 generates [A023039, A060645], respectively the numerator and denominator of the 2i-th convergent of sqrt(a(9)), i.e., sqrt(5). - Lekraj Beedassy, Feb 26 2002
LINKS
Eric Weisstein's World of Mathematics, Pell Equation.
MATHEMATICA
squarefreepart[n_] :=
Times @@ Power @@@ ({#[[1]], Mod[#[[2]], 2]} & /@ FactorInteger[n]);
pellminx[d_] := Module[{q, p, z}, {q, p} = ContinuedFraction[Sqrt[d]];
If[OddQ[p // Length], p = Join[p, p]];
z = FromContinuedFraction[Join[{q}, Drop[p, -1]]]; Numerator[z]]
NMAX = 60; a = {};
For[n = 2, n <= NMAX, n++, s = squarefreepart[n^2 - 1];
sd = s Divisors[Sqrt[(n^2 - 1)/s]]^2;
t = Sort[Transpose[{sd, pellminx[#] & /@ sd}]];
AppendTo[a, Select[t, #[[2]] == n &, 1][[1, 1]]]
]; a (* Herbert Kociemba, Jun 05 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved
A067872 Least m > 0 for which m*n^2 + 1 is a square. +10
6
3, 2, 7, 3, 23, 8, 47, 15, 79, 24, 119, 2, 167, 48, 3, 63, 287, 80, 359, 6, 88, 120, 527, 28, 623, 168, 727, 12, 839, 44, 959, 255, 216, 288, 8, 20, 1367, 360, 19, 77, 1679, 22, 1847, 30, 208, 528, 2207, 7, 2399, 624, 128, 42, 2807, 728, 696, 3, 160, 840, 3479, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Least m > 0 for which x^2 - m*y^2 = 1 has a solution with y = n.
For n > 1, a(n) <= n^2-2. - Chai Wah Wu, Jan 26 2016
LINKS
T. D. Noe and Chai Wah Wu, Table of n, a(n) for n = 1..10000 n = 1..500 from T. D. Noe
FORMULA
For n a power of an odd prime, a(n) = n^2 - 2. For n twice a power of an odd prime, a(n) = (n/2)^2 - 1. - T. D. Noe, Sep 13 2007
EXAMPLE
a(4)=3, based on 3*4^2 + 1 = 7^2.
MATHEMATICA
a[n_] := For[m=1, True, m++, If[IntegerQ[Sqrt[m*n^2+1]], Return[m]]]; Table[a[n], {n, 100}]
lm[n_]:=Module[{m=1}, While[!IntegerQ[Sqrt[m n^2+1]], m++]; m]; Array[lm, 60] (* Harvey P. Dale, Feb 24 2013 *)
PROG
(Haskell)
a067872 n = (until ((== 1) . a010052 . (+ 1)) (+ nn) nn) `div` nn
where nn = n ^ 2
-- Reinhard Zumkeller, Jun 28 2013
(Python)
def A067872(n):
y, x, n2 = n*(n+2), 2*n+3, n**2
m, r = divmod(y, n2)
while r:
y += x
x += 2
m, r = divmod(y, n2)
return m # Chai Wah Wu, Jan 25 2016
CROSSREFS
Cf. A010052.
KEYWORD
nice,nonn
AUTHOR
Lekraj Beedassy, Feb 25 2002
EXTENSIONS
Edited by Dean Hickerson, Mar 19 2002
STATUS
approved
A033319 Incrementally largest values of minimal y satisfying Pell equation x^2-Dy^2=1. +10
3
0, 2, 4, 6, 180, 1820, 3588, 9100, 226153980, 15140424455100, 183567298683461940, 9562401173878027020, 42094239791738433660, 1238789998647218582160, 189073995951839020880499780706260 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Records in A033317 (or A002349).
LINKS
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Eric Weisstein's World of Mathematics, Pell Equation.
MATHEMATICA
PellSolve[(m_Integer)?Positive] := Module[{cf, n, s}, cf = ContinuedFraction[Sqrt[m]]; n = Length[Last[cf]]; If[n == 0, Return[{}]]; If[OddQ[n], n = 2 n]; s = FromContinuedFraction[ ContinuedFraction[ Sqrt[m], n]]; {Numerator[s], Denominator[s]}];
yy = DeleteCases[PellSolve /@ Range[10^5], {}][[All, 2]];
Reap[Module[{y, record = 0}, Sow[0]; For[i = 1, i <= Length@yy, i++, y = yy[[i]]; If[y > record, record = y; Sow[y]]]]][[2, 1]] (* Jean-François Alcover, Nov 21 2020, after N. J. A. Sloane in A002350 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved
page 1

Search completed in 0.009 seconds

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 August 29 15:03 EDT 2024. Contains 375517 sequences. (Running on oeis4.)