login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 1
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 (list; graph; refs; listen; history; text; internal format)
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

Cf. A194880, A195240, A185138, A206568, A110897, A110898.

Sequence in context: A246592 A241816 A243109 * A211940 A230664 A175717

Adjacent sequences: A206009 A206010 A206011 * A206013 A206014 A206015

KEYWORD

nonn,easy,less

AUTHOR

Roger L. Bagula, Mar 19 2012

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 5 12:38 EST 2023. Contains 360084 sequences. (Running on oeis4.)