cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A039969 An example of a d-perfect sequence: a(n) = Catalan(n) mod 3.

This page as a plain text file.
%I A039969 #58 Sep 08 2022 08:44:53
%S A039969 1,1,2,2,2,0,0,0,2,2,2,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,1,1,1,0,0,
%T A039969 0,1,1,1,2,2,2,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 A039969 0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,1,1,1,0,0,0,1,1,1,2,2,2,0,0,0,0,0,0,0,0,0,0
%N A039969 An example of a d-perfect sequence: a(n) = Catalan(n) mod 3.
%C A039969 This is A006996 with all its terms repeated three times, except the initial term only twice. A006996 is a fixed point of the morphism 0 -> 000, 1 -> 120, 2 -> 210. [The original comment edited by _Antti Karttunen_, Aug 14 2017]
%C A039969 Equals Catalan(n) mod 3. (Cf. A000108.) - _Paul D. Hanna_, Jun 20 2003 [confirmed by _Christian G. Bower_, Jun 12 2005]
%C A039969 Catalan numbers: C(n) = binomial(2n,n)/(n+1) = (2n)!/(n!(n+1)!).
%H A039969 Antti Karttunen, <a href="/A039969/b039969.txt">Table of n, a(n) for n = 0..10000</a>
%H A039969 Rob Burns, <a href="https://arxiv.org/abs/1611.03705">Asymptotic density of Catalan numbers modulo 3 and powers of 2</a>, arXiv:1611.03705 [math.NT], 2016.
%H A039969 David Kohel, San Ling and Chaoping Xing, <a href="https://doi.org/10.1007/978-1-4471-0551-0_23">Explicit Sequence Expansions</a>, in: C. Ding, T. Helleseth and H. Niederreiter (eds.), Sequences and their Applications, Proceedings of SETA'98 (Singapore, 1998), Discrete Mathematics and Theoretical Computer Science, 1999, pp. 308-317; <a href="http://www.maths.usyd.edu.au/u/kohel/doc/perfect.ps">alternative link</a>.
%H A039969 <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>
%F A039969 a(n) = ((-1)^(n+1)*A001006(n-1)) mod 3, for n>0. - _Christian G. Bower_, Jun 12 2005
%F A039969 a(n) = a(n-1) if n == 0 or 1 (mod 3). a(n) = 0 if n == 5,6, or 7 (mod 9). - _Robert Israel_, Sep 20 2015
%F A039969 a(3n) = A006996(n). - _Antti Karttunen_, Aug 14 2017
%F A039969 Asymptotic mean: lim_{n->oo} (1/n) Sum_{k=1..n} a(k) = 0 (Burns, 2016). - _Amiram Eldar_, Jan 26 2021
%p A039969 seq(binomial(2*n, n)/(n+1) mod 3, n = 0 .. 100); # _Robert Israel_, Sep 20 2015
%t A039969 Take[ Flatten[ Nest[ Flatten[ # /. {1 -> {1, 2, 0}, 2 -> {2, 1, 0}, 0 -> {0, 0, 0}}] &, {1}, 4] /. {1 -> {1, 1, 1}, 2 -> {2, 2, 2}, 0 -> {0, 0, 0}}], {2, 106}] (* or *)
%t A039969 Table[ Mod[ Binomial[ 2n, n]/(n + 1), 3], {n, 0, 104}] (* _Robert G. Wilson v_, Sep 09 2005 *)
%t A039969 Mod[CatalanNumber[Range[0,110]],3] (* _Harvey P. Dale_, Oct 23 2017 *)
%o A039969 (Magma) [Catalan(n) mod 3: n in [1..80]]; // _Vincenzo Librandi_, Jul 14 2015
%o A039969 (PARI) A039969(n) = ((binomial(2*n, n)/(n+1))%3); \\ _Antti Karttunen_, Aug 13 2017
%Y A039969 Cf. A000108, A001006, A010872, A039972, A067397.
%Y A039969 Cf. A006996 (trisection).
%K A039969 nonn
%O A039969 0,3
%A A039969 _N. J. A. Sloane_
%E A039969 More terms from _Christian G. Bower_, Jun 12 2005
%E A039969 Offset corrected from 1 to 0 by _Antti Karttunen_, Aug 13 2017