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.

A178543 Partial sums of round(3^n/5).

Original entry on oeis.org

0, 1, 3, 8, 24, 73, 219, 656, 1968, 5905, 17715, 53144, 159432, 478297, 1434891, 4304672, 12914016, 38742049, 116226147, 348678440, 1046035320, 3138105961, 9414317883, 28242953648, 84728860944, 254186582833
Offset: 0

Views

Author

Mircea Merca, Dec 28 2010

Keywords

Examples

			a(4) = round(1/5) + round(3/5) + round(9/5) + round(27/5) + round(81/5) = 0 + 1 + 2 + 5 + 16 = 24.
		

Crossrefs

Cf. A112030.

Programs

  • Magma
    [Round(3^(n+1)/10): n in [0..40]]; // Vincenzo Librandi, Jun 21 2011
    
  • Maple
    seq(round(3^n/10),n=1..25);
  • Mathematica
    Accumulate[Floor[3^Range[0,30]/5+1/2]] (* Harvey P. Dale, Jul 02 2011 *)
  • PARI
    vector(40, n, n--; (3*(3^n +1)/10)\1) \\ G. C. Greubel, Jan 30 2019
    
  • Sage
    [floor(3*(3^n+1)/10) for n in range(40)] # G. C. Greubel, Jan 30 2019

Formula

a(n) = round(3^(n+1)/10).
a(n) = floor((3*3^n + 3)/10).
a(n) = ceiling((3*3^n - 3)/10).
a(n) = a(n-4) + 8*3^(n-3), n > 3.
a(n) = 3*a(n-1) - a(n-2) + 3*a(n-3), n > 2.
G.f.: x/((1-3*x)*(1+x^2)).
a(n) = 3^(n+1)/10 - (-1)^n* A112030(n)/10. - R. J. Mathar, Jan 08 2011