login
A155598
a(n) = 7^n-2^n+1.
26
1, 6, 46, 336, 2386, 16776, 117586, 823416, 5764546, 40353096, 282474226, 1977324696, 13841283106, 96889002216, 678223056466, 4747561477176, 33232930504066, 232630513856136, 1628413597648306, 11398895184848856
OFFSET
0,2
FORMULA
G.f.: 1/(1-7*x)-1/(1-2*x)+1/(1-x). E.g.f.: e^(7*x)-e^(2*x)+e^x.
a(n) = 9*a(n-1)-14*a(n-2)+6 with a(0)=1, a(1)=6 - Vincenzo Librandi, Jul 21 2010
a(0)=1, a(1)=6, a(2)=46, a(n) = 10*a(n-1)-23*a(n-2)+14*a(n-3). - Harvey P. Dale, Feb 28 2013
a(n) = A190540(n)+1. - R. J. Mathar, Mar 10 2022
MATHEMATICA
Table[7^n-2^n+1, {n, 0, 20}] (* or *) LinearRecurrence[{10, -23, 14}, {1, 6, 46}, 20] (* Harvey P. Dale, Feb 28 2013 *)
PROG
(PARI) a(n)=7^n-2^n+1 \\ Charles R Greathouse IV, Sep 24 2015
KEYWORD
nonn,easy
AUTHOR
Mohammad K. Azarian, Jan 25 2009
STATUS
approved