OFFSET
1,2
COMMENTS
2*a(n) = y0(n) is the positive fundamental solution satisfying the Pell equation x0(n)^2 + D(n)*y0(n)^2 = +1 with D(n) coinciding apparently with Conway's rectangular numbers r(n) = A007969(n). The corresponding x0 values are given in A262024.
For a proof of this coincidence see the W. Lang link under A007969. - Wolfdieter Lang, Oct 04 2015
EXAMPLE
The [r(n), x0(n), y0(n)] values for n = 1..16 are:
[2, 3, 2], [5, 9, 4], [6, 5, 2], [10, 19, 6],
[12, 7, 2], [13, 649, 180], [14, 15, 4],
[17, 33, 8], [18, 17, 4], [20, 9, 2],
[21, 55, 12], [22, 197, 42], [26, 51, 10],
[28, 127, 24], [29, 9801, 1820], [30, 11, 2], ...
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]}];
Select[DeleteCases[PellSolve /@ Range[200], {}][[All, 2]], EvenQ]/2 (* Jean-François Alcover, Aug 12 2023, using the PellSolve code given in A033317 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Wolfdieter Lang, Sep 16 2015
STATUS
approved