login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A321104 Sequence generated by: a(3*n) = 1, a(3*n+2) = 2 - a(3*n+1), a(9*n+1) = 0, a(9*n+7) = 2, a(9*n+4) = 2 - a(3*n+1), for n >= 0. 0
1, 0, 2, 1, 2, 0, 1, 2, 0, 1, 0, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 0, 1, 0, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 0, 1, 0, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 0, 1, 0, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 0, 1, 0, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 0, 1, 0, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 0, 1, 0, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 0, 1, 0, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Table of n, a(n) for n=0..200.

FORMULA

FORMULA FOR TERMS: for n >= 0,

(1) a(3*n) = 1,

(2) a(3*n+2) = 2 - a(3*n+1),

(3) a(9*n+1) = 0,

(4) a(9*n+7) = 2,

(5) a(9*n+4) = 2 - a(3*n+1).

PROG

(PARI) /* Using formula for terms */

{a(n) =

if(n%3==0, 1,

if(n%3==2, 2 - a(n-1),

if(n%9==1, 0,

if(n%9==7, 2,

if(n%9==4, 2 - a((n-1)/3) )))))}

for(n=0, 200, print1(a(n), ", "))

CROSSREFS

Sequence in context: A277729 A057985 A135387 * A127442 A115628 A114002

Adjacent sequences:  A321101 A321102 A321103 * A321105 A321106 A321107

KEYWORD

nonn

AUTHOR

Paul D. Hanna, Nov 25 2018

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 23 12:19 EDT 2021. Contains 346259 sequences. (Running on oeis4.)