# Asymptotic density of Motzkin numbers modulo 3

In previous posts we have established the asymptotic densities of the Motzkin numbers modulo $2^{k}, k \in \{1, 2, 3 \}$ and $5$. The main result of this note is that

Theorem 1.

$\lim_{N \to \infty} \frac {1}{N} \#\{n \leq N: M_n \equiv 0 \mod 3 \} = 1$.

Firstly, let $T(\, 01 )\,$ denote the set of natural numbers which have a base 3 expansion containing only the digits $0$ and $1$. The following theorem from [1] will be used to prove theorem 1.

Theorem 2. (Corollary 4.10 of [1]). The Motzkin numbers satisfy

$M_n \equiv -1 \mod 3 \quad$ if  $\quad n \in 3T (\, 01 )\, - 1$,

$M_{n} \equiv 1 \mod 3 \quad$  if  $\quad n \in 3T(\, 01 )\quad$ or $\quad n \in 3T(\, 01 )\, - 2$,

$M_n \equiv 0 \mod 3 \quad$ otherwise.

We will first examine the nature of the set $T(\, 01 \,)$. We have

Theorem 3. The asymptotic density of the set $T(\, 01 \,)$ is zero.

Proof:

Choose $k \in N: 3^{k} \leq N < 3^{k+1}$. Then $k = \lfloor log_3 (\, N )\, \rfloor$ and

$\frac {1}{N} \# \{ n \leq N : n \in T(01) \} \leq \frac {2^{k+1}}{N} \leq \frac {2^{k+1}}{3^{k}} \to 0$ as $N \to \infty$.

$\Box \,$ .

Proof of Theorem 1.

Since the asymptotic density of $T(\, 01 \,)$ is zero, so is the asymptotic density of the sets $3T(\, 01 \,) - k$ for $k \in \{0, 1, 2\}$. Therefore Theorem 2 implies that

$\lim_{N \to \infty} \frac {1}{N} \# \{n \leq N : M_n \equiv +-1 \mod 3 \} = 0$

and the result follows.

$\Box \,$ .

## References.

[1] Deutsch, E., & Sagan, B. E. (2006). Congruences for Catalan and Motzkin numbers and related sequences. Journal of Number Theory, 117(1), 191–215. http://doi.org/10.1016/j.jnt.2005.06.005