[go: up one dir, main page]

login
A135574
A024495 but with terms swapped in pairs.
3
0, 0, 3, 1, 11, 6, 42, 21, 171, 85, 683, 342, 2730, 1365, 10923, 5461, 43691, 21846, 174762, 87381, 699051, 349525, 2796203, 1398102, 11184810, 5592405, 44739243, 22369621, 178956971, 89478486, 715827882, 357913941, 2863311531, 1431655765
OFFSET
0,3
FORMULA
a(n+1) - 2*a(n) = A135575(n).
O.g.f.: x^2*(3 + x +2*x^2 +3*x^3)/((1-2*x)*(1+2*x)*(x^2-x+1)*(x^2+x+1)). - R. J. Mathar, Mar 31 2008
a(n) = 3*a(n-2) + 3*a(n-4) + 4*a(n-6). - G. C. Greubel, Oct 19 2016
a(n) = (1/6)*(2^(n-1)*(5+3*(-1)^n) - (1+3*(-1)^n)*ChebyshevU(n, 1/2) - (1-3*(-1)^n)*ChebyshevU(n-1, 1/2)). - G. C. Greubel, Jan 05 2022
MAPLE
A024495 := proc(n) option remember ; if n <=1 then 0; elif n = 2 then 1; else 3*procname(n-1)-3*procname(n-2)+2*procname(n-3) ; fi; end: A135574 := proc(n) option remember ; if n mod 2 = 0 then A024495(n+1) ; else A024495(n-1) ; fi; end: seq(A135574(n), n=0..40) ; # R. J. Mathar, Feb 07 2009
MATHEMATICA
LinearRecurrence[{0, 3, 0, 3, 0, 4}, {0, 0, 3, 1, 11, 6}, 41] (* G. C. Greubel, Oct 19 2016 *)
PROG
(Magma) I:=[0, 0, 3, 1, 11, 6]; [n le 6 select I[n] else 3*Self(n-2) +3*Self(n-4) +4*Self(n-6): n in [1..41]]; // G. C. Greubel, Jan 05 2022
(Sage) [(1/6)*(2^(n-1)*(5+3*(-1)^n) - (1+3*(-1)^n)*chebyshev_U(n, 1/2) - (1-3*(-1)^n)*chebyshev_U(n-1, 1/2)) for n in (0..40)] # G. C. Greubel, Jan 05 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Feb 24 2008
EXTENSIONS
More terms from R. J. Mathar, Mar 31 2008
More terms from R. J. Mathar, Feb 07 2009
STATUS
approved