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.
%I A039971 #23 Jul 08 2025 22:41:14 %S A039971 1,1,2,0,0,1,2,2,1,0,0,0,0,0,0,0,0,1,2,2,1,0,0,2,1,1,2,0,0,0,0,0,0,0, %T A039971 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,1,0,0,2,1,1,2,0,0,0,0,0, %U A039971 0,0,0,2,1,1,2,0,0,1,2,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 %N A039971 An example of a d-perfect sequence. %H A039971 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 A039971 a(n) = ((-1)^(n+1)*A007317(n)) mod 3 - _Christian G. Bower_, Jun 12 2005 %F A039971 a(n) = A001405(n-1) mod 3. - _John M. Campbell_, Jul 19 2016 %t A039971 Table[Mod[Binomial[n - 1, Floor[(n - 1)/2]], 3], {n, 120}] (* or *) %t A039971 Table[Function[n, Mod[-(-1)^(n + 1) Sum[Binomial[n, k] CatalanNumber@ k, {k, 0, n}], 3]][n - 1], {n, 120}] (* _Michael De Vlieger_, Jul 19 2016 *) %o A039971 (Magma) [Binomial(n, Floor(n/2)) mod 3: n in [0..140]]; // _Vincenzo Librandi_, Jul 20 2016 %K A039971 nonn %O A039971 1,3 %A A039971 _N. J. A. Sloane_ %E A039971 More terms from _Christian G. Bower_, Jun 12 2005