A107660 Sum 3^max(k,n-k),k=0..n.
1, 6, 21, 72, 225, 702, 2133, 6480, 19521, 58806, 176661, 530712, 1592865, 4780782, 14344533, 43040160, 129127041, 387400806, 1162222101, 3486725352, 10460235105, 31380882462, 94142824533, 282429005040, 847287546561
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,3,-9).
Programs
-
Mathematica
CoefficientList[Series[(1 + 3 x) / ((1 - 3 x) (1 - 3 x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 17 2013 *)
Formula
G.f.: (1+3*x)/((1-3*x)*(1-3*x^2)).
a(2n) = 3^(2n+1) - 2*3^n; a(2n+1) = 9^(n+1) - 3^(n+1).
Comments