|
|
A123020
|
|
Expansion of (1 -5*x +5*x^2)/((1 -2*x)*(1 -4*x +x^2)).
|
|
1
|
|
|
1, 1, 2, 5, 14, 43, 142, 493, 1766, 6443, 23750, 88045, 327406, 1219531, 4546622, 16958765, 63272054, 236096683, 881049142, 3287968813, 12270563966, 45793762763, 170903438510, 637817894125, 2380363943686, 8883629492011
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Denominator of reduced g.f. is essentially the characteristic polynomial of [1, 1, 0; 1, 2, 1; 0, 1, 3]. - Paul Barry, Dec 17 2009
|
|
LINKS
|
|
|
FORMULA
|
G.f.: 1/(1 -x -x^2/(1 -2*x -x^2/(1-3*x))) = (1-5*x+5*x^2)/(1-6*x+9*x^2-2*x^3).
a(n) = ((2+sqrt(3))/6)*(2-sqrt(3))^n + ((2-sqrt(3))/6)*(2+sqrt(3))^n + 2^n/3. (End)
a(n) = (1/3)*(2^n - ChebyshevT(n+1, 2) + 4*ChebyshevT(n, 2)). - G. C. Greubel, Jul 11 2021
|
|
MATHEMATICA
|
Table[(2^n - ChebyshevT[n + 1, 2] + 4*ChebyshevT[n, 2])/3, {n, 0, 30}] (* G. C. Greubel, Jul 11 2021 *)
|
|
PROG
|
(Magma) I:=[1, 1, 2]; [n le 3 select I[n] else 6*Self(n-1) - 9*Self(n-2) +2*Self(n-3): n in [1..31]]; // G. C. Greubel, Jul 11 2021
(Sage)
def a(n): return (1/3)*(2^n - chebyshev_T(n+1, 2) + 4*chebyshev_T(n, 2))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|