OFFSET
1,4
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..700
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 (5,-8,8,-7,3).
FORMULA
2*a(n) = round((3*3^n - 10*n - 5)/20).
2*a(n) = floor((3*3^n - 10*n + 1)/20).
2*a(n) = ceiling((3*3^n - 10*n - 11)/20).
2*a(n) = round((3*3^n - 10*n - 3)/20).
a(n) = a(n-4) + 2*3^(n-3) - 1, n > 4.
a(n) = 5*a(n-1) - 8*a(n-2) + 8*a(n-3) - 7*a(n-4) + 3*a(n-5), n > 5.
G.f.: x^3/((1-3*x)*(1+x^2)*(1-x)^2).
EXAMPLE
a(4) = (1/2)*(floor(3/10) + floor(9/10) + floor(27/10) + floor(81/10)) = (1/2)*(0 + 0 + 2 + 8) = (1/2)*10 = 5.
MAPLE
A178828 := proc(n) add( floor(3^i/10)/2, i=0..n) ; end proc:
MATHEMATICA
Accumulate[Floor[3^Range[30]/10]/2] (* Harvey P. Dale, Dec 17 2012 *)
PROG
(Magma) [Round((3*3^n-10*n-5)/40): n in [1..30]]; // Vincenzo Librandi, Jun 21 2011
(PARI) my(x='x+O('x^30)); concat([0, 0], Vec(x^3/((1-3*x)*(1+x^2)*(1-x)^2))) \\ G. C. Greubel, Jan 22 2019
(Sage) a=(x^3/((1-3*x)*(1+x^2)*(1-x)^2)).series(x, 20).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Jan 22 2019
(GAP) a:=List([1..30], n->(1/2)*Int((3*3^n-10*n+1)/20));; Print(a); # Muniru A Asiru, Jan 22 2019
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Mircea Merca, Dec 27 2010
STATUS
approved