A174132 2*3^(n-1)-(-1)^n.
3, 5, 19, 53, 163, 485, 1459, 4373, 13123, 39365, 118099, 354293, 1062883, 3188645, 9565939, 28697813, 86093443, 258280325, 774840979, 2324522933, 6973568803, 20920706405, 62762119219, 188286357653, 564859072963
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..200
- Index entries for linear recurrences with constant coefficients, signature (2,3).
Crossrefs
Cf. A154992.
Programs
-
Magma
[2*3^(n-1)-(-1)^n: n in [1..30]]; // Vincenzo Librandi, Aug 21 2014
-
Mathematica
Table[(2 3^(n-1) - (-1)^n), {n, 30}] (* or *) CoefficientList[Series[(3 - x)/((1 + x)(1 - 3 x)), {x, 0, 30}], x] (* Vincenzo Librandi, Aug 21 2014 *)
Formula
From Bruno Berselli, Jan 28 2011 - Jan 30 2011: (Start)
G.f.: x*(3-x)/((1+x)*(1-3*x)).
a(n) = 2*sum[a(i), i=1..n-1]-2*(-1)^n+1 for n>1. (End)