login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A185940
a(n) = 1 - 2^(n+1) + 3^(n+2).
1
24, 74, 228, 698, 2124, 6434, 19428, 58538, 176124, 529394, 1590228, 4774778, 14332524, 43013954, 129074628, 387289418, 1161999324, 3486260114, 10459304628, 31378962458, 94138984524, 282421147874, 847271832228, 2541832273898, 7625530376124, 22876658237234
OFFSET
1,1
FORMULA
a(n) = 1 - A000079(n+1) + A000244(n+2)
From Alexander R. Povolotsky, Jan 07 2011: (Start)
G.f.: 2*x*(12 - 35*x + 24*x^2) / (1 - 6*x + 11*x^2 - 6*x^3)
a(n+2) = -6*a(n) + 5*a(n+1)+2. (End)
a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3). - G. C. Greubel, Feb 25 2017
E.g.f.: exp(x) - 2*exp(2*x) + 9*exp(3*x) - 8. - G. C. Greubel, Jul 23 2017
MAPLE
A185940:=n->1-2^(n+1)+3^(n+2): seq(A185940(n), n=1..40); # Wesley Ivan Hurt, Jul 23 2017
MATHEMATICA
CoefficientList[Series[-2*x*(12 - 35*x + 24*x^2)/(-1 + 6*x - 11*x^2 + 6*x^3), {x, 0, 50}], x] (* or *) LinearRecurrence[{6, -11, 6}, {24, 74, 228}, 50] (* G. C. Greubel, Feb 25 2017 *)
PROG
(Magma) [1 - 2^(n+1) + 3^(n+2): n in [1..40]]; // Vincenzo Librandi, Apr 05 2011
(PARI) x='x+O('x^50); Vec(-2*x*(12 - 35*x + 24*x^2) / (-1 + 6*x - 11*x^2 + 6*x^3)) \\ G. C. Greubel, Feb 25 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amir H. Farrahi, Feb 06 2011
EXTENSIONS
Corrected and edited by Bruno Berselli, Apr 04 2011
STATUS
approved