OFFSET
0,4
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..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,-7,2,5,-7,3).
FORMULA
a(n) = round((6*3^n - 14*n - 7)/28).
a(n) = floor((6*3^n - 14*n + 2)/28).
a(n) = ceiling((6*3^n - 14*n - 16)/28).
a(n) = round((6*3^n - 14*n - 6)/28).
a(n) = a(n-6) + 52*3^(n-5) - 3, n > 5.
a(n) = 5*a(n-1) - 7*a(n-2) + 2*a(n-3) + 5*a(n-4) - 7*a(n-5) + 3*a(n-6).
G.f.: x^2*(1 - x + 2*x^2)/((1-3*x)*(1+x)*(1-x+x^2)*(1-x)^2).
EXAMPLE
a(6) = 0 + 0 + 1 + 3 + 11 + 34 + 104 = 153.
MAPLE
A178704 := proc(n) add( floor(3^i/7), i=0..n) ; end proc:
MATHEMATICA
Table[Floor[(6*3^n-14*n+2)/28], {n, 0, 30}] (* G. C. Greubel, Jan 25 2019 *)
PROG
(Magma) [Round((6*3^n-14*n-7)/28): n in [0..30]]; // Vincenzo Librandi, Jun 21 2011
(PARI) vector(30, n, n--; ((6*3^n-14*n+2)/28)\1) \\ G. C. Greubel, Jan 25 2019
(Sage) [floor((6*3^n-14*n+2)/28) for n in (0..30)] # G. C. Greubel, Jan 25 2019
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Mircea Merca, Dec 26 2010
STATUS
approved