OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
S. Kitaev and T. Mansour, Counting the occurrences of generalized patterns....
Index entries for linear recurrences with constant coefficients, signature (6, -8).
FORMULA
a(n) = (3*4^(n-1) + 2^n)/2, a(1) = 3.
G.f.: (6 - 20*x + 8*x^2)/((1-2*x)*(1-4*x)).
a(n) = 6*a(n-1) - 8*a(n-2); a(1)=3, a(2)=8, a(3)=28. -Harvey P. Dale, Oct 02 2011
MATHEMATICA
Join[{3}, Table[(3*4^(n-1)+2^n)/2, {n, 2, 30}]] (* or *) Join[{3}, LinearRecurrence[ {6, -8}, {8, 28}, 30]] (* Harvey P. Dale, Oct 02 2011 *)
PROG
(PARI) a(n)=(3*4^(n-1)+2^n)/2
(Magma) [Ceiling((3*(4^(n-1)) + 2^n)/2): n in [1..30]]; // Vincenzo Librandi, Oct 03 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Stephan, Apr 27 2004
STATUS
approved