[go: up one dir, main page]

login
A011377
Expansion of 1/((1-x)*(1-2*x)*(1-x^2)).
12
1, 3, 8, 18, 39, 81, 166, 336, 677, 1359, 2724, 5454, 10915, 21837, 43682, 87372, 174753, 349515, 699040, 1398090, 2796191, 5592393, 11184798, 22369608, 44739229, 89478471, 178956956, 357913926, 715827867, 1431655749, 2863311514, 5726623044, 11453246105, 22906492227, 45812984472, 91625968962
OFFSET
0,2
FORMULA
From Paul Barry, Jul 29 2004: (Start)
a(n) = Sum_{k=0..n+2} floor((n-k+2)/2) * 2^k;
a(n) = Sum_{k=0..n+2} floor(k/2) * 2^(n-k+2). (End)
a(n) = Sum_{k=0..floor((n+2)/2)} binomial(n-k+2, k+2)*2^k. - Paul Barry, Oct 25 2004
a(n) = floor((2^(n+4) - 3*n - 6)/6). - David W. Wilson, Feb 26 2006
a(n) = (2^(n+5) - 6*n - 21 + (-1)^n)/12. - Hieronymus Fischer, Dec 02 2006
Row sums of triangle A135086. - Gary W. Adamson, Nov 18 2007
a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + 2*a(n-4). - Paul Curtz, Jul 29 2008
G.f.: Q(0)/(3*x*(1-x)^2), where Q(k) = 1 - 1/(4^k - 2*x*16^k/(2*x*4^k - 1/(1 + 1/(2*4^k - 8*x*16^k/(4*x*4^k + 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 21 2013
From Michael A. Allen, Jan 11 2022: (Start)
a(n) = J(n+3) - ceiling((n+3)/2), where Jacobsthal number J(n) = A001045(n).
a(n) = Sum_{j=1..n+1} j*J(n+2-j). (End)
MATHEMATICA
Table[(2^(n+5) -6*n-21+(-1)^n)/12, {n, 0, 30}] (* Vladimir Joseph Stephan Orlovsky, Jan 29 2011, modified by G. C. Greubel, Jun 02 2019 *)
CoefficientList[Series[1/((1-x)(1-2x)(1-x^2)), {x, 0, 30}], x] (* or *) LinearRecurrence[{3, -1, -3, 2}, {1, 3, 8, 18}, 30] (* Harvey P. Dale, Apr 17 2017 *)
PROG
(Magma) [Floor((2^(n+4)-3*n-6)/6): n in [0..30]]; // Vincenzo Librandi, Aug 14 2011
(PARI) my(x='x+O('x^30)); Vec(1/((1-x)*(1-2*x)*(1-x^2))) \\ G. C. Greubel, Sep 26 2017
(Sage) [(2^(n+5) -6*n-21+(-1)^n)/12 for n in (0..30)] # G. C. Greubel, Jun 02 2019
(GAP) List([0..30], n-> (2^(n+5) -6*n -21 +(-1)^n)/12) # G. C. Greubel, Jun 02 2019
CROSSREFS
Partial sums of A000975.
Second partial sums of A001045.
Cf. A135086.
Sequence in context: A128552 A238361 A178420 * A036385 A196534 A317188
KEYWORD
nonn,easy
STATUS
approved