[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A206012
Modular recursion: a(0)=a(1)=a(2)=a(3)=1, thereafter: a(n) equals a(n - 2) + a(n - 3) when n = 0 mod 5, a(n - 1) + a(n - 3) when n = 1 mod 5, a(n - 1) + a(n - 2) when n = 2 mod 5, a(n - 1) + a(n - 4) when n = 3 mod 5, and a(n - 1) + a(n - 2) + a(n - 3) otherwise.
2
1, 1, 1, 1, 3, 2, 3, 5, 8, 16, 13, 21, 34, 50, 105, 84, 134, 218, 323, 675, 541, 864, 1405, 2080, 4349, 3485, 5565, 9050, 13399, 28014, 22449, 35848, 58297, 86311, 180456, 144608, 230919, 375527, 555983, 1162429, 931510, 1487493, 2419003, 3581432, 7487928
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
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