OFFSET
0,4
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
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 (4,-4,4,-3).
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
EXAMPLE
a(4) = 0 + 0 + 1 + 3 + 8 = 12.
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 *)
PROG
(Magma) [Round((3*3^n-3)/20): n in [0..30]]; // Vincenzo Librandi, Jun 23 2011
(PARI) a(n)=(3^(n+1)-1)\20 \\ Charles R Greathouse IV, Jun 23 2011
CROSSREFS
KEYWORD
nonn,less,easy
AUTHOR
Mircea Merca, Dec 28 2010
STATUS
approved