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!)
A270740 Period 9: repeat 0,1,2,2,0,1,1,2,0. 1
0, 1, 2, 2, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 1, 1, 2, 0, 0, 1, 2, 2, 0, 1, 1, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = (n - floor(n/3)) mod 3.
From Chai Wah Wu, Jun 04 2016: (Start)
a(n) = a(n-1) - a(n-3) + a(n-4) - a(n-6) + a(n-7) for n > 6.
G.f.: x*(1 + x - x^3 + 2*x^4)/((1 - x)*(1 + x^3 + x^6)). (End)
MATHEMATICA
Table[Mod[n - Floor[n/3], 3], {n, 0, 120}] (* Michael De Vlieger, Mar 25 2016 *)
PadRight[{}, 120, {0, 1, 2, 2, 0, 1, 1, 2, 0}] (* Harvey P. Dale, Jan 16 2019 *)
PROG
(PARI) a(n) = (n - n\3) % 3; \\ Michel Marcus, Mar 22 2016
CROSSREFS
Cf. A002264 (floor(n/3)), A010872 (n mod 3).
Sequence in context: A206442 A137581 A156311 * A189463 A287451 A113414
KEYWORD
nonn,easy
AUTHOR
William Walkington, Mar 22 2016
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 April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)