OFFSET
0,2
COMMENTS
Denote as {a,b,c,d} the second-order linear recurrence a(n) = c*a(n-1) + d*a(n-2) with initial terms a, b. The following sequences and recurrence formulas are related to integer solutions of k*x^2 + 1 = y^2.
.
k x y
- ----------------------- -----------------------
20 a(n) {0,2,18,-1} A023039 {1,9,18,-1}
The sequence of the c parameter is listed in A180495.
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..500
Hacène Belbachir, Soumeya Merwa Tebtoub, and László Németh, Ellipse Chains and Associated Sequences, J. Int. Seq., Vol. 23 (2020), Article 20.8.5.
Index entries for linear recurrences with constant coefficients, signature (18,-1).
FORMULA
a(n) = 18*a(n-1) - a(n-2).
From Bruno Berselli, Feb 21 2012: (Start)
G.f.: 2*x/(1-18*x+x^2).
a(n) = -a(-n) = 2*A049660(n) = ((2 + sqrt(5))^(2*n)-(2 - sqrt(5))^(2*n))/(4*sqrt(5)). (End)
a(n) = Fibonacci(6*n)/4. - Bruno Berselli, Jun 19 2019
For n>=1, a(n) = A079962(6n-3). - Christopher Hohl, Aug 22 2021
MAPLE
readlib(issqr):for x from 1 to 720016798592704030 do if issqr(20*x^2+1) then print(x) fi od;
MATHEMATICA
LinearRecurrence[{18, -1}, {0, 2}, 16] (* Bruno Berselli, Feb 21 2012 *)
Table[2 ChebyshevU[-1 + n, 9], {n, 0, 16}] (* Herbert Kociemba, Jun 05 2022 *)
PROG
(Magma) m:=16; R<x>:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(2*x/(1-18*x+x^2))); // Bruno Berselli, Jun 19 2019
(Maxima) makelist(expand(((2+sqrt(5))^(2*n)-(2-sqrt(5))^(2*n))/(4*sqrt(5))), n, 0, 15); /* Bruno Berselli, Jun 19 2019 */
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Gary Detlefs, Feb 20 2012
STATUS
approved