OFFSET
1,2
COMMENTS
Partial sums of A081251(n-1).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Mircea Merca, Inequalities and Identities Involving Sums of Integer Functions J. Integer Sequences, Vol. 14 (2011), Article 11.9.1.
Index entries for linear recurrences with constant coefficients, signature (4,-2,-4,3).
FORMULA
a(n) = round((3*3^n - 4*n - 4)/8).
a(n) = floor((3*3^n - 4*n - 3)/8).
a(n) = ceiling((3*3^n - 4*n - 5)/8).
a(n) = round((3*3^n - 4*n - 3)/8).
a(n) = a(n-2) + 3^(n-1) - 1, n > 2.
From Bruno Berselli, Jan 14 2011: (Start)
a(n) = (3*3^n - 4*n - 4 + (-1)^n)/8.
G.f.: 2*x^2/((1+x)*(1-3*x)*(1-x)^2). (End)
EXAMPLE
a(3) = 0 + 2 + 6 = 8.
MAPLE
seq (round ((3*3^n-4*n-3)/8), n=1..25);
MATHEMATICA
Accumulate[Floor[3^Range[30]/4]] (* Harvey P. Dale, Nov 04 2011 *)
CoefficientList[Series[2 x/((1 + x) (1 - 3 x) (1 - x)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2014 *)
PROG
(Magma) [Floor((3*3^n-4*n-3)/8): n in [1..30]]; // Vincenzo Librandi, Jun 23 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mircea Merca, Dec 26 2010
STATUS
approved