OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..2500
Index entries for linear recurrences with constant coefficients, signature (0,0,1,1,0,0,-1).
FORMULA
G.f.: (2 + x + 5*x^2 + 3*x^3 + 3*x^4 + x^5) / ((1 - x^3) * (1 - x^4)).
a(n) = - A071047(-2-n) for all n in Z.
a(n+7) = a(n+4) + a(n+3) - a(n) for all n in Z.
a(n+3) = a(n) + [3, 5, 2, 5][mod(n, 4) + 1] for all n in Z.
a(n+4) = a(n) + [4, 6, 5][mod(n, 3) + 1] for all n in Z.
a(n+12) = a(n) + 15 for all n in Z.
a(n) = a(n-3) + a(n-4) - a(n-7). - Muniru A Asiru, Aug 01 2018
EXAMPLE
G.f. = 2 + x + 5*x^2 + 5*x^3 + 6*x^4 + 7*x^5 + 10*x^6 + 9*x^7 + 12*x^8 + ...
MAPLE
seq(coeff(series((2+x+5*x^2+3*x^3+3*x^4+x^5)/((1-x^3)*(1-x^4)), x, n+1), x, n), n=0..70); # Muniru A Asiru, Aug 01 2018
MATHEMATICA
a[ n_] := QUotient[ 5 n, 4] + { 0, 3, 2, 1, 1, 3, 1, 2, 1, 2, 2, 2}[[Mod[n, 12, 1]]];
CoefficientList[Series[(2 + x + 5*x^2 + 3*x^3 + 3*x^4 + x^5)/((1 - x^3)*(1 - x^4)), {x, 0, 50}], x]] (* G. C. Greubel, Aug 01 2018 *)
LinearRecurrence[{0, 0, 1, 1, 0, 0, -1}, {2, 1, 5, 5, 6, 7, 10}, 70] (* Robert G. Wilson v, Aug 01 2018 *)
PROG
(PARI) {a(n) = (5*n\4) + [ 2, 0, 3, 2, 1, 1, 3, 1, 2, 1, 2, 2][n%12 + 1]};
(PARI) {a(n) = polcoeff( if( n<0, n = -2-n; -(1 + 3*x + 3*x^2 + 5*x^3 + x^4 + 2*x^5), 2 + x + 5*x^2 + 3*x^3 + 3*x^4 + x^5) / ((1 - x^3) * (1 - x^4)) + x * O(x^n), n)};
(GAP) a:=[2, 1, 5, 5, 6, 7, 10];; for n in [8..70] do a[n]:=a[n-3]+a[n-4]-a[n-7]; od; a; # Muniru A Asiru, Aug 01 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Aug 01 2015
STATUS
approved