A086445 Partial sums of A005578.
1, 2, 4, 7, 13, 24, 46, 89, 175, 346, 688, 1371, 2737, 5468, 10930, 21853, 43699, 87390, 174772, 349535, 699061, 1398112, 2796214, 5592417, 11184823, 22369634, 44739256, 89478499, 178956985, 357913956, 715827898, 1431655781, 2863311547
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- OEIS Wiki, Autosequence
- Index entries for linear recurrences with constant coefficients, signature (3,-1,-3,2).
Programs
-
Magma
[2*2^n/3+(-1)^n/12+n/2+1/4: n in [0..40]]; // Vincenzo Librandi, Apr 05 2012
-
Maple
A086445:=n->2*2^n/3+(-1)^n/12+n/2+1/4: seq(A086445(n), n=0..40); # Wesley Ivan Hurt, Apr 24 2017
-
Mathematica
CoefficientList[Series[(1-x-x^2)/((1+x)(1-x)^2(1-2x)),{x,0,40}],x] (* Vincenzo Librandi, Apr 05 2012 *) LinearRecurrence[{3,-1,-3,2},{1,2,4,7},40] (* Harvey P. Dale, May 28 2015 *)
Formula
G.f.: (1-x-x^2)/((1+x)(1-x)^2(1-2x)).
a(n) = 2*2^n/3+(-1)^n/12+n/2+1/4.
a(0) = 1, a(n) = floor(2*a(n-1) - n/2 + 1) for n>0. - Gerald McGarvey, Aug 31 2004
a(n+1) - 2*a(n) = -floor(n/2) = -A004526(n). - Jean-François Alcover, Oct 21 2019 [noticed by Paul Curtz in a private e-mail]
Comments