Search: a033318 -id:a033318
|
|
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
|
|
|
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]]]
|
|
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.
|
|
LINKS
|
|
|
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
(Python)
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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nice,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
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
|
|
|
LINKS
|
|
|
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]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.009 seconds
|