login
A155614
9^n - 3^n + 1.
6
1, 7, 73, 703, 6481, 58807, 530713, 4780783, 43040161, 387400807, 3486725353, 31380882463, 282429005041, 2541864234007, 22876787671993, 205891117745743, 1853020145805121, 16677181570526407, 150094634909578633
OFFSET
0,2
FORMULA
G.f.: 1/(1-9*x)-1/(1-3*x)+1/(1-x).
E.g.f.: e^(9*x)-e^(3*x)+e^x.
a(n) = 12*a(n-1)-27*a(n-2)+16 with a(0)=1, a(1)=7. - Vincenzo Librandi, Jul 21 2010
MATHEMATICA
Table[9^n-3^n+1, {n, 0, 20}] (* Harvey P. Dale, Feb 03 2011 *)
PROG
(PARI) a(n)=9^n-3^n+1 \\ Charles R Greathouse IV, Oct 07 2015
KEYWORD
nonn,easy
AUTHOR
Mohammad K. Azarian, Jan 26 2009
STATUS
approved