OFFSET
1,2
LINKS
S. Kitaev and T. Mansour, Counting the occurrences of generalized patterns....
Index entries for linear recurrences with constant coefficients, signature (6, -8).
FORMULA
a(1) = 0, a(n) = (3*4^(n-1) - 2^n)/2.
G.f.: 4*x*(1-x)/((1-2*x)*(1-4*x)).
a(1)=0, a(2)=4, a(3)=20, a(n)=6*a(n-1)-8*a(n-2). - Harvey P. Dale, Apr 04 2012
a(n) = 4*A010036(n-2). - R. J. Mathar, Apr 07 2022
MATHEMATICA
Join[{0}, Table[(3*4^(n-1)-2^n)/2, {n, 2, 30}]] (* or *) Join[{0}, LinearRecurrence[{6, -8}, {4, 20}, 30]] (* Harvey P. Dale, Apr 04 2012 *)
PROG
(PARI) a(n)=if(n==1, 0, (3*4^(n-1)-2^n)/2)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Apr 27 2004
STATUS
approved