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.

A086401 a(n) = M(n) (mod n) where M(n) = A001006(n) is the n-th Motzkin number.

Original entry on oeis.org

0, 0, 1, 1, 1, 3, 1, 3, 7, 8, 1, 7, 1, 10, 12, 11, 1, 6, 1, 19, 0, 3, 1, 21, 1, 16, 7, 5, 1, 1, 1, 19, 18, 20, 23, 7, 1, 3, 7, 17, 1, 36, 1, 41, 9, 26, 1, 21, 1, 28, 24, 45, 1, 33, 18, 43, 45, 32, 1, 39, 1, 34, 24, 51, 51, 42, 1, 19, 30, 7, 1, 9, 1, 40, 57, 57, 19, 24, 1, 17, 61, 44, 1, 37, 51
Offset: 1

Views

Author

Benoit Cloitre, Sep 06 2003

Keywords

Comments

If n is an odd prime a(n) = 1.

Crossrefs

Programs

  • Mathematica
    motz[0] = motz[1] = 1; motz[n_] := motz[n] = ((2*n + 1)*motz[n-1] + 3*(n-1)*motz[n-2])/(n+2); a[n_] := Mod[motz[n], n]; Array[a, 100] (* Amiram Eldar, Apr 20 2025 *)

Formula

a(n) = 0 if and only if n is in A266969. - Amiram Eldar, Apr 20 2025

Extensions

Data corrected by Amiram Eldar, Apr 20 2025