cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A178222 Partial sums of floor(3^n/4).

Original entry on oeis.org

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

Views

Author

Mircea Merca, Dec 26 2010

Keywords

Comments

Partial sums of A081251(n-1).

Examples

			a(3) = 0 + 2 + 6 = 8.
		

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)