A111954 a(n) = A000129(n) + (-1)^n.
1, 0, 3, 4, 13, 28, 71, 168, 409, 984, 2379, 5740, 13861, 33460, 80783, 195024, 470833, 1136688, 2744211, 6625108, 15994429, 38613964, 93222359, 225058680, 543339721, 1311738120, 3166815963, 7645370044, 18457556053, 44560482148, 107578520351
Offset: 0
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (1,3,1).
Programs
-
Mathematica
LinearRecurrence[{1,3,1},{1,0,3},40] (* Harvey P. Dale, Nov 24 2014 *)
Formula
a(n) = a(n-1) + 3*a(n-2) + a(n-3), n >= 3.
G.f.: (x-1)/((x+1)*(x^2+2*x-1)).
a(n) = (sqrt(2)/4)*((1 + sqrt(2))^n - (1 - sqrt(2))^n) + (-1)^n.
E.g.f.: cosh(x) - sinh(x) + exp(x)*sinh(sqrt(2)*x)/sqrt(2). - Stefano Spezia, May 26 2024
Comments