A178222 Partial sums of floor(3^n/4).
0, 2, 8, 28, 88, 270, 816, 2456, 7376, 22138, 66424, 199284, 597864, 1793606, 5380832, 16142512, 48427552, 145282674, 435848040, 1307544140, 3922632440, 11767897342, 35303692048, 105911076168, 317733228528
Offset: 1
Examples
a(3) = 0 + 2 + 6 = 8.
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).
Crossrefs
Cf. A081251.
Programs
-
Magma
[Floor((3*3^n-4*n-3)/8): n in [1..30]]; // Vincenzo Librandi, Jun 23 2011
-
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 *)
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)
Comments