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!)
A159955 Period 9: repeat [0, 1, 2, 1, 2, 0, 2, 0, 1]. 3
0, 1, 2, 1, 2, 0, 2, 0, 1, 0, 1, 2, 1, 2, 0, 2, 0, 1, 0, 1, 2, 1, 2, 0, 2, 0, 1, 0, 1, 2, 1, 2, 0, 2, 0, 1, 0, 1, 2, 1, 2, 0, 2, 0, 1, 0, 1, 2, 1, 2, 0, 2, 0, 1, 0, 1, 2, 1, 2, 0, 2, 0, 1, 0, 1, 2, 1, 2, 0, 2, 0, 1, 0, 1, 2, 1, 2, 0, 2, 0, 1, 0, 1, 2, 1, 2, 0, 2, 0, 1, 0, 1, 2, 1, 2, 0, 2, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n+9) = a(n) with a(0) = a(5) = a(7) = 0, a(1) = a(3) = a(8) = 1, a(2) = a(4) = a(6) = 2.
a(n) = floor((4*n-9)/3) mod 3. - Gary Detlefs, May 15 2011
a(n) = (n + floor(n/3)) mod 3. - William Walkington, Mar 22 2016
From Chai Wah Wu, Jul 30 2020: (Start)
a(n) = a(n-1) - a(n-3) + a(n-4) - a(n-6) + a(n-7) for n > 6.
G.f.: x*(-x^5 + x^4 - 2*x^3 + x^2 - x - 1)/((x - 1)*(x^6 + x^3 + 1)). (End)
MATHEMATICA
PadRight[{}, 120, {0, 1, 2, 1, 2, 0, 2, 0, 1}] (* Vincenzo Librandi, Mar 24 2016 *)
PROG
(Magma) &cat[[0, 1, 2, 1, 2, 0, 2, 0, 1]^^15]; // Vincenzo Librandi, Mar 24 2016
CROSSREFS
Sequence in context: A245472 A332685 A258196 * A327306 A053838 A342651
KEYWORD
easy,nonn
AUTHOR
Philippe Deléham, Apr 27 2009
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 May 11 07:10 EDT 2024. Contains 372388 sequences. (Running on oeis4.)