login
A170832
a(n) = 3^(floor(n/2))+3^(floor(n/2)-1)-3^(floor((n-1)/3)).
3
3, 3, 9, 9, 33, 27, 99, 99, 297, 297, 945, 891, 2835, 2835, 8505, 8505, 26001, 25515, 78003, 78003, 234009, 234009, 706401, 702027, 2119203, 2119203, 6357609, 6357609, 19112193, 19072827, 57336579, 57336579, 172009737, 172009737, 516383505, 516029211, 1549150515
OFFSET
2,1
LINKS
R. P. Stanley, Problem 11348, Amer. Math. Monthly, 117 (2010), 87-88.
FORMULA
a(n) = 3*a(n-2) +3*a(n-3) -9*a(n-5). G.f.: -3*x^2*(x^4+3*x^3-x-1) / ((3*x^2-1)*(3*x^3-1)). - Colin Barker, Jul 26 2013
MATHEMATICA
LinearRecurrence[{0, 3, 3, 0, -9}, {3, 3, 9, 9, 33}, 40] (* Harvey P. Dale, Dec 18 2015 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 30 2009
STATUS
approved