OFFSET
1,2
COMMENTS
This sequence is part of a solution of a general problem involving 2 equations, three sequences a(n), b(n), c(n) and a constant A:
A * c(n)+1 = a(n)^2,
(A+1) * c(n)+1 = b(n)^2, where solutions are given by the recurrences:
a(1) = 1, a(2) = 4*A+1, a(n) = (4*A+2)*a(n-1)-a(n-2) for n>2, resulting in a(n) terms 1, 4*A+1, 16*A^2+12*A+1, 64*A^3+80*A^2+24*A+1, ...;
b(1) = 1, b(2) = 4*A+3, b(n) = (4*A+2)*b(n-1)-b(n-2) for n>2, resulting in b(n) terms 1, 4*A+3, 16*A^2+20*A+5, 64*A^3+112*A^2+56*A+7, ...;
c(1) = 0, c(2) = 16*A+8, c(3) = (16*A^2+16*A+3)*c(2), c(n) = (16*A^2+16*A+3) * (c(n-1)-c(n-2)) + c(n-3) for n>3, resulting in c(n) terms 0, 16*A+8, 256*A^3+384*A^2+176*A+24, 4096*A^5 + 10240*A^4 + 9472*A^3 + 3968*A^2 + 736*A + 48, ... .
A157014 is the a(n) sequence for A=5.
For other A values the a(n), b(n) and c(n) sequences are in the OEIS:
A a-sequence b-sequence c-sequence
Positive values of x (or y) satisfying x^2 - 22xy + y^2 + 20 = 0. - Colin Barker, Feb 19 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (22,-1).
FORMULA
G.f.: x*(1-x)/(1-22*x+x^2).
a(1) = 1, a(2) = 21, a(n) = 22*a(n-1) - a(n-2) for n>2.
5*A157460(n)+1 = a(n)^2 for n>=1.
a(n) = (6+sqrt(30)-(-6+sqrt(30))*(11+2*sqrt(30))^(2*n))/(12*(11+2*sqrt(30))^n). - Gerry Martens, Jun 07 2015
a(n) = ChebyshevU(n-1, 11) - ChebyshevU(n-2, 11). - G. C. Greubel, Jan 14 2020
MAPLE
seq( simplify(ChebyshevU(n-1, 11) - ChebyshevU(n-2, 11)), n=1..20); # G. C. Greubel, Jan 14 2020
MATHEMATICA
CoefficientList[Series[(1-x)/(1-22x+x^2), {x, 0, 20}], x] (* Vincenzo Librandi, Feb 21 2014 *)
a[c_, n_] := Module[{},
p := Length[ContinuedFraction[ Sqrt[ c]][[2]]];
d := Denominator[Convergents[Sqrt[c], n p]];
t := Table[d[[1 + i]], {i, 0, Length[d] - 1, p}];
Return[t];
] (* Complement of A041049 *)
a[30, 20] (* Gerry Martens, Jun 07 2015 *)
Table[ChebyshevU[n-1, 11] - ChebyshevU[n-2, 11], {n, 20}] (* G. C. Greubel, Jan 14 2020 *)
PROG
(PARI) Vec((1-x)/(1-22*x+x^2)+O(x^20)) \\ Charles R Greathouse IV, Sep 23 2012
(Magma) I:=[1, 21]; [n le 2 select I[n] else 22*Self(n-1)-Self(n-2): n in [1..20]]; // Vincenzo Librandi, Feb 21 2014
(Sage) [chebyshev_U(n-1, 11) - chebyshev_U(n-2, 11) for n in (1..20)] # G. C. Greubel, Jan 14 2020
(GAP) a:=[1, 21];; for n in [3..20] do a[n]:=22*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Jan 14 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Weisenhorn, Feb 21 2009
EXTENSIONS
Edited by Alois P. Heinz, Sep 09 2011
STATUS
approved