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.

A039970 An example of a d-perfect sequence: a(2*n) = 0, a(2*n+1) = Catalan(n) mod 3.

This page as a plain text file.
%I A039970 #19 Sep 08 2022 08:44:53
%S A039970 1,0,1,0,2,0,2,0,2,0,0,0,0,0,0,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,0,0,
%T A039970 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,2,0,1,0,1,0,1,0,0,0,0,0,
%U A039970 0,0,1,0,1,0,1,0,2,0,2,0,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
%N A039970 An example of a d-perfect sequence: a(2*n) = 0, a(2*n+1) = Catalan(n) mod 3.
%H A039970 Antti Karttunen, <a href="/A039970/b039970.txt">Table of n, a(n) for n = 1..65537</a>
%H A039970 D. Kohel, S. Ling and C. Xing, <a href="http://www.maths.usyd.edu.au/u/kohel/doc/perfect.ps">Explicit Sequence Expansions</a>, in Sequences and their Applications, C. Ding, T. Helleseth, and H. Niederreiter, eds., Proceedings of SETA'98 (Singapore, 1998), 308-317, 1999. DOI: 10.1007/978-1-4471-0551-0_23
%F A039970 a(2*n) = 0, a(2*n+1) = A039969(n). - _Christian G. Bower_, Jun 12 2005, sign edited because of changed offset of A039969. - _Antti Karttunen_, Feb 13 2019
%t A039970 Table[If[IntegerQ[n/2], 0, Mod[CatalanNumber[(n-1)/2], 3]], {n, 1, 100}] (* _G. C. Greubel_, Feb 13 2019 *)
%o A039970 (PARI)
%o A039970 A039969(n) = ((binomial(2*n, n)/(n+1))%3);
%o A039970 A039970(n) = if(n%2,A039969((n-1)/2),0); \\ _Antti Karttunen_, Feb 13 2019
%o A039970 (Sage)
%o A039970 def A039970(n):
%o A039970     if (mod(n,2)==0):
%o A039970         return 0
%o A039970     else:
%o A039970         return mod(catalan_number((n-1)/2), 3)
%o A039970 [A039970(n) for n in (1..100)] # _G. C. Greubel_, Feb 13 2019
%o A039970 (Magma) [n mod 2 eq 0 select 0 else Catalan(Floor((n-1)/2)) mod 3: n in [1..100]]; // _G. C. Greubel_, Feb 13 2019
%Y A039970 Cf. A039969.
%K A039970 nonn
%O A039970 1,5
%A A039970 _N. J. A. Sloane_
%E A039970 More terms from _Christian G. Bower_, Jun 12 2005
%E A039970 Formula added to the name by _Antti Karttunen_, Feb 13 2019