OFFSET
0,5
COMMENTS
This sequence was inspired by the work of Paul Curtz on three part sequences. I did a three part version of this that gave a generating polynomial and got even more variance by adding two more modulo sequences.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,6,0,0,0,0,3,0,0,0,0,-1).
FORMULA
G.f.: (x^15 - x^13 + x^12 - 2x^10 - 2x^9 + 2x^8 - x^7 - 3x^6 - 4x^5 + 3x^4 + x^3 + x^2 + x + 1) / (x^15 - 3x^10 - 6x^5 + 1). - Alois P. Heinz, Mar 19 2012
MATHEMATICA
a[0] = 1; a[1] = 1; a[2] = 1; a[3] = 1; a[n_Integer] := a[n]=If[Mod[n, 5] == 0, a[n - 2] + a[n - 3], If[Mod[n, 5] == 1, a[n - 1] + a[n - 3], If[Mod[n, 5] == 2, a[n - 1] + a[n - 2], If[Mod[n, 5] == 3, a[n - 1] + a[n - 4], a[n - 1] + a[n - 2] + a[n - 3]]]]]; b = Table[a[n], {n, 0, 50}]; (* FindSequenceFunction gives*); Table[c[n] = b[[n]], {n, 1, 16}]; c[n_Integer] := c[n] = -c[-15 + n] + c[-10 + n] + 6 c[-5 + n]; d = Table[c[n], {n, 1, Length[b]}]
CoefficientList[Series[(x^15-x^13+x^12-2*x^10-2*x^9+2*x^8-x^7-3*x^6-4*x^5+3*x^4+x^3+x^2+x+1)/(x^15-3*x^10-6*x^5+1), {x, 0, 1001}], x] (* Vincenzo Librandi, Apr 01 2012 *)
PROG
(PARI) Vec((x^15-x^13+x^12-2*x^10-2*x^9+2*x^8-x^7-3*x^6-4*x^5+3*x^4+x^3+x^2+x+1)/(x^15-3*x^10-6*x^5+1)+O(x^99)) \\ Charles R Greathouse IV, Mar 19 2012
(Magma) m:=40; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((x^15-x^13+x^12-2*x^10-2*x^9+2*x^8-x^7-3*x^6-4*x^5+3*x^4+x^3+x^2+x+1)/(x^15-3*x^10-6*x^5+1))); // Bruno Berselli, Mar 20 2012
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
Roger L. Bagula, Mar 19 2012
STATUS
approved