login
A186948
a(n) = 3^n - 2*n.
3
1, 1, 5, 21, 73, 233, 717, 2173, 6545, 19665, 59029, 177125, 531417, 1594297, 4782941, 14348877, 43046689, 129140129, 387420453, 1162261429, 3486784361, 10460353161, 31381059565, 94143178781, 282429536433, 847288609393, 2541865828277, 7625597484933, 22876792454905, 68630377364825
OFFSET
0,3
COMMENTS
Binomial transform is A186947 and A186949.
FORMULA
G.f.: (1 - 4*x + 7*x^2)/((1-x)^2*(1-3*x)).
a(n) = 3*a(n-1) + 2*(2*n - 3). - Vincenzo Librandi, Mar 13 2011
a(n) = 5*a(n-1) - 7*a(n-2) + 3*a(n-3); a(0)=1, a(1)=1, a(2)=5. - Harvey P. Dale, Nov 24 2011
E.g.f.: exp(x)*(exp(2*x) - 2*x). - Elmo R. Oliveira, Sep 15 2024
MATHEMATICA
Table[3^n-2n, {n, 0, 30}] (* or *) LinearRecurrence[{5, -7, 3}, {1, 1, 5}, 30] (* Harvey P. Dale, Nov 24 2011 *)
PROG
(PARI) a(n)=3^n-2*n \\ Charles R Greathouse IV, Oct 16 2015
CROSSREFS
Sequence in context: A055280 A268304 A273450 * A271251 A201435 A202507
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Mar 01 2011
EXTENSIONS
a(26)-a(29) from Elmo R. Oliveira, Sep 15 2024
STATUS
approved