OFFSET
0,3
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-9,8,-4).
FORMULA
G.f.: x*(1-x)/(1 - 5*x + 9*x^2 - 8*x^3 + 4*x^4).
a(n) = 5*a(n-1) - 9*a(n-2) + 8*a(n-3) - 4*a(n-4).
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*(-1)^k*(4^(n-k) - 1)/3.
a(n) = (1/3)*((n+1)*2^n - A010892(n)). - Ralf Stephan, May 15 2007
Binomial transform of A042965: (1, 3, 4, 5, 7, 8, 9, 11, 12, 13, ...), also row sums of triangle A133110. - Gary W. Adamson, Sep 12 2007
MATHEMATICA
LinearRecurrence[{5, -9, 8, -4}, {0, 1, 4, 11}, 41] (* G. C. Greubel, Jan 24 2023 *)
PROG
(Magma) I:=[0, 1, 4, 11]; [n le 4 select I[n] else 5*Self(n-1) -9*Self(n-2) +8*Self(n-3) -4*Self(n-4): n in [1..41]]; // G. C. Greubel, Jan 24 2023
(SageMath)
def A100335(n): return (1/3)*((n+1)*2^n - chebyshev_U(n, 1/2))
[A100335(n) for n in range(41)] # G. C. Greubel, Jan 24 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Nov 17 2004
STATUS
approved