OFFSET
0,2
COMMENTS
a(n) is the number of compositions of n when there are 3 types of 1 and 6 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,3).
FORMULA
G.f.: (1-x)/(1-4*x-3*x^2).
a(n) = Sum_{k=0..n} 3^k*A122542(n,k).
Limit_{n->infinity} a(n+1)/a(n) = 2 + sqrt(7) = 4.645751311064....
a(n) = ((7+sqrt(7))/14)*(2+sqrt(7))^n + ((7-sqrt(7))/14)*(2-sqrt(7))^n. - Richard Choulet, Nov 20 2008
MATHEMATICA
LinearRecurrence[{4, 3}, {1, 3}, 30] (* Harvey P. Dale, Mar 18 2023 *)
PROG
(PARI) Vec((1-x)/(1-4*x-3*x^2) + O(x^30)) \\ Michel Marcus, Feb 04 2022
(Magma)
[n le 2 select 3^(n-1) else 4*Self(n-1) +3*Self(n-2): n in [1..41]]; // G. C. Greubel, Oct 27 2024
(SageMath)
A122558= BinaryRecurrenceSequence(4, 3, 1, 3)
[A122558(n) for n in range(41)] # G. C. Greubel, Oct 27 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Philippe Deléham, Sep 20 2006, Sep 22 2006
EXTENSIONS
Corrected by T. D. Noe, Nov 07 2006
STATUS
approved