OFFSET
0,6
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1,0,0,1,-1,0,-1,1).
FORMULA
Euler transform of length 10 sequence [0, 1, 1, 0, 1, 0, 1, 0, 0, -1].
G.f.: (1 - x^10) / ((1 - x^2) * (1 - x^3) * (1 - x^5) * (1 - x^7)) = (1-x+x^2-x^3+x^4) / ((1-x)^3*(1+x+x^2)*(1+x+x^2+x^3+x^4+x^5+x^6)).
a(n) = a(-7-n) for all n in Z.
EXAMPLE
G.f. = 1 + x^2 + x^3 + x^4 + 2*x^5 + 2*x^6 + 3*x^7 + 3*x^8 + 4*x^9 + ...
MATHEMATICA
a[ n_] := Quotient[ n^2 + 7 n - 9 Boole[Mod[n, 3] == 1], 42] + 1;
PROG
(PARI) {a(n) = (n^2 + 7*n - 9*(n%3==1))\42 + 1};
(PARI) {a(n) = my(m=max(n, -7-n)); polcoeff( (1 + x^5) / ((1 - x^2)*(1 - x^3)*(1 - x^7))+ x*O(x^m), m)};
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Oct 17 2018
STATUS
approved