A039971 An example of a d-perfect sequence.
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, 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, 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
Offset: 1
Keywords
Links
- D. Kohel, S. Ling and C. Xing, Explicit Sequence Expansions, 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
Programs
-
Magma
[Binomial(n, Floor(n/2)) mod 3: n in [0..140]]; // Vincenzo Librandi, Jul 20 2016
-
Mathematica
Table[Mod[Binomial[n - 1, Floor[(n - 1)/2]], 3], {n, 120}] (* or *) 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 *)
Formula
a(n) = ((-1)^(n+1)*A007317(n)) mod 3 - Christian G. Bower, Jun 12 2005
a(n) = A001405(n-1) mod 3. - John M. Campbell, Jul 19 2016
Extensions
More terms from Christian G. Bower, Jun 12 2005