OFFSET
1,1
COMMENTS
We can easily prove that a(n) = 3^n + 2^n - 2.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (6,-11,6).
FORMULA
a(n) = 3^n + 2^n - 2.
G.f.: x*(3-7*x)/((1-3*x)*(1-2*x)*(1-x)). - Vincenzo Librandi, Mar 03 2014
EXAMPLE
pi(1) + pi(2) + pi(3)=3 so a(1)=3.
MAPLE
MATHEMATICA
Table[3^n+2^n-2, {n, 26}]
CoefficientList[Series[(3 - 7 x)/((1 - 3 x) (1 - 2 x) (1 - x)), {x, 0, 30}], x] (* Vincenzo Librandi, Mar 03 2014 *)
LinearRecurrence[{6, -11, 6}, {3, 11, 33}, 30] (* Harvey P. Dale, Feb 28 2017 *)
PROG
(PARI) a(n)=3^n+2^n-2 \\ Charles R Greathouse IV, Jun 19 2013
(Magma) [3^n+2^n-2: n in [1..30]]; // Vincenzo Librandi, Mar 03 2014
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Farideh Firoozbakht, May 09 2010
STATUS
approved