OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..2500
Index entries for linear recurrences with constant coefficients, signature (2,0,-1,-1,0,2,-1).
FORMULA
G.f.: (1 + 2*x + x^2 + x^3) / ((1 - x)^2 * (1 - x^2) * (1 - x^3)).
a(n) - 2*a(n+1) + 2*a(n+3) - a(n+4) = -1 if n == 1 (mod 3) else -2 for all n in Z.
a(n) = -A254875(-4-n) for all n in Z.
EXAMPLE
G.f. = 1 + 4*x + 9*x^2 + 18*x^3 + 31*x^4 + 49*x^5 + 73*x^6 + 104*x^7 + ...
MATHEMATICA
a[ n_] := Quotient[ 10 n^3 + 63 n^2 + 126 n + 89, 72];
Table[Floor[(10*n^3 +63*n^2 +126*n +89)/72], {n, 0, 50}] (* G. C. Greubel, Aug 03 2018 *)
PROG
(PARI) {a(n) = (10*n^3 + 63*n^2 + 126*n + 89) \ 72};
(PARI) {a(n) = polcoeff( (-1)^(n<0) * (if( n<0, n = -4 - n; x^2, x) + 1 + x + x^2 + x^3) / ((1 - x)^2 * (1 - x^2) * (1 - x^ 3)) + x * O(x^n), n)};
(Magma) [Floor((10*n^3 +63*n^2 +126*n +89)/72): n in [0..50]]; // G. C. Greubel, Aug 03 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Feb 09 2015
STATUS
approved