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!)
A006996 a(n) = C(2n,n) mod 3.
(Formerly M0021)
9

%I M0021 #40 Jan 25 2023 21:57:41

%S 1,2,0,2,1,0,0,0,0,2,1,0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,1,2,0,0,

%T 0,0,1,2,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

%U 0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,1,2,0,0,0,0,1,2,0,2,1,0,0,0,0,0,0,0,0,0,0

%N a(n) = C(2n,n) mod 3.

%C Removing 0's from the sequence gives Thue-Morse sequence A001285 : 1,2,0,2,1,0,0,0,0,2,1,0,1,2,..->1,2,2,1,2,1,1,2,... - _Benoit Cloitre_, Jan 04 2004

%C a(n) = 0 if n in A074940, a(n) = 1 if n in A074939, a(n) = 2 if n in A074938.

%C Central terms of the triangle in A083093. - _Reinhard Zumkeller_, Jul 11 2013

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Reinhard Zumkeller, <a href="/A006996/b006996.txt">Table of n, a(n) for n = 0..2187=3^7</a>

%H Michael Gilleland, <a href="/selfsimilar.html">Some Self-Similar Integer Sequences</a>

%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>

%F a(n)=A005704(n) mod 3. - _Benoit Cloitre_, Jan 04 2004

%F A fixed point of the morphism : 1 -> 120, 2 -> 210, 0 -> 000. - _Philippe Deléham_, Jan 08 2004

%t Table[ Mod[ Binomial[2n, n], 3], {n, 0, 104}] (* Or *)

%t Nest[ Function[ l, {Flatten[(l /. {0 -> {0, 0, 0}, 1 -> {1, 2, 0}, 2 -> {2, 1, 0}})]}], {1}, 7] (* _Robert G. Wilson v_, Mar 28 2005 *)

%o (Haskell)

%o a006996 n = a083093 (2 * n) n -- _Reinhard Zumkeller_, Jul 11 2013

%o (PARI) a(n)=if(n==0, return(1)); if(vecmax(Set(digits(n,3)))>1, 0, 1 + n%2) \\ _Charles R Greathouse IV_, May 09 2016

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, _James Propp_

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 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)