OFFSET
0,2
COMMENTS
a(n) is the number of compositions of n when there are 3 types of 1 and 8 types of other natural numbers. - Milan Janjic, Aug 13 2010
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,5).
FORMULA
a(n) = (2*5^n + (-1)^n)/3.
G.f.: (1-x)/((1-5*x)*(1+x)).
E.g.f.: (2*exp(5*x) + exp(-x))/3
a(n) = Sum_{k=0..n} Sum_{j=0..n-k} C(n,j)*C(n-j,k)*J(n-j+1) where J(n) = A001045(n). - Paul Barry, May 19 2006
a(0)=1, a(n) = 5*a(n-1) - 2 if n is odd, and a(n) = 5*a(n) + 2 if n is even. - Vincenzo Librandi, Nov 18 2010
MATHEMATICA
LinearRecurrence[{4, 5}, {1, 3}, 30] (* Harvey P. Dale, Sep 18 2018 *)
PROG
(Sage)
from sage.combinat.sloane_functions import recur_gen2b
it = recur_gen2b(1, 3, 4, 5, lambda n: 0)
[next(it) for i in range(1, 24)] # Zerinvary Lajos, Jul 03 2008
(Magma) [(2*5^n +(-1)^n)/3: n in [0..40]]; // G. C. Greubel, Feb 17 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Apr 23 2003
STATUS
approved