OFFSET
0,3
COMMENTS
With offset 1, partial sums of A085350. - Paul Barry, Jun 24 2003
Number of walks of length 2n+2 between two nodes at distance 4 in the cycle graph C_12. - Herbert Kociemba, Jul 05 2004
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (8,-19,12).
FORMULA
a(n) = ((4^(n+1) - 1)/3 - 3^n)/2 = (4*4^n - 3*3^n - 1)/6.
G.f.: x*(1-2*x)/((1-x)*(1-3*x)*(1-4*x)).
From Elmo R. Oliveira, Aug 29 2024: (Start)
E.g.f.: exp(x)*(4*exp(3*x) - 3*exp(2*x) - 1)/6.
a(n) = 8*a(n-1) - 19*a(n-2) + 12*a(n-3) for n > 2. (End)
MATHEMATICA
Join[{a=0, b=1}, Table[c=7*b-12*a-1; a=b; b=c, {n, 60}]] (* Vladimir Joseph Stephan Orlovsky, Jan 19 2011 *)
CoefficientList[Series[(x(1-2x))/((1-x)(1-3x)(1-4x)), {x, 0, 30}], x] (* or *) LinearRecurrence[{8, -19, 12}, {0, 1, 6}, 30] (* Harvey P. Dale, Nov 28 2018 *)
PROG
(Magma) [((4^(n+1)-1)/3-3^n)/2: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Mar 28 2003
STATUS
approved