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.

A177881 Partial sums of round(3^n/10).

Original entry on oeis.org

0, 0, 1, 4, 12, 36, 109, 328, 984, 2952, 8857, 26572, 79716, 239148, 717445, 2152336, 6457008, 19371024, 58113073, 174339220, 523017660, 1569052980, 4707158941, 14121476824, 42364430472, 127093291416
Offset: 0

Views

Author

Mircea Merca, Dec 28 2010

Keywords

Examples

			a(4) = 0 + 0 + 1 + 3 + 8 = 12.
		

Crossrefs

Cf. A015577 (bisection of round(3^n/10)).

Programs

  • Magma
    [Round((3*3^n-3)/20): n in [0..30]]; // Vincenzo Librandi, Jun 23 2011
    
  • Maple
    A177881 := proc(n) add( round(3^i/10),i=0..n) ; end proc:
  • Mathematica
    Table[(3^(n + 1) + (3 - (-1)^n) i^(n (n + 1)) - 5)/20, {n, 0, 25}] (* Bruno Berselli, May 12 2021 *)
  • PARI
    a(n)=(3^(n+1)-1)\20 \\ Charles R Greathouse IV, Jun 23 2011

Formula

G.f.: x^2/((1 - x)*(1 - 3*x)*(1 + x^2)).
a(n) = round((3*3^n - 3)/20) = round((3*3^n - 5)/20).
a(n) = floor((3*3^n - 1)/20).
a(n) = ceiling((3*3^n - 9)/20).
a(n) = a(n-4) + 4*3^(n-3), n > 3.
a(n) = 4*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4), n > 3.
a(n) = (3^(n+1) + (3 - (-1)^n)*i^(n*(n+1)) - 5)/20, where i = sqrt(-1) - Bruno Berselli, May 12 2021