OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Jair Taylor, Counting Words with Laguerre Series, Electron. J. Combin., 21 (2014), P2.1.
Index entries for linear recurrences with constant coefficients, signature (8,-24,32,-16).
FORMULA
G.f.: (1 - 5*x + 9*x^2 - 5*x^3 - 2*x^4 + 6*x^5 - 6*x^6 + 6*x^7)/ (1 - 8*x + 24*x^2 - 32*x^3 + 16*x^4).
a(n) = 3*2^(n-7)*(16 + 36*n - n^2 + n^3) for n > 3. - Colin Barker, Jun 06 2015
a(n) = 8*a(n-1) - 24*a(n-2) + 32*a(n-3) - 16*a(n-4) for n > 7. - Colin Barker, Jun 06 2015
E.g.f.: (1/16)*(10 + 9*x + 3*x^2 + x^3 + (6 + 27*x + 3*x^2 + 3*x^3)*exp(2*x)). - G. C. Greubel, Sep 22 2023
MATHEMATICA
LinearRecurrence[{8, -24, 32, -16}, {1, 3, 9, 27, 78, 222, 618, 1686}, 41] (* G. C. Greubel, Sep 22 2023 *)
PROG
(PARI) Vec((6*x^7-6*x^6+6*x^5-2*x^4-5*x^3+9*x^2-5*x+1)/ (16*x^4-32*x^3+24*x^2-8*x+1) + O(x^100)) \\ Colin Barker, Jun 06 2015
(Magma)
A241574:= func< n | n le 3 select 3^n else 3*2^(n-7)*(16+36*n-n^2+n^3) >;
[A241574(n): n in [0..40]]; // G. C. Greubel, Sep 22 2023
(SageMath)
def A241574(n): return 3^n if (n<4) else 3*2^(n-7)*(16 +36*n -n^2 +n^3)
[A241574(n) for n in range(41)] # G. C. Greubel, Sep 22 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 26 2014
STATUS
approved