21.2.7 Let $n$ and $m$ be positive integers, $A=\{1,2, \cdots, n\}, B_{n}^{m}-\left\{\left(a_{1}, a_{2}, \cdots, a_{m}\right) \mid a_{i}\right.$ $\in A, i=1,2, \cdots, m\}$ satisfy:
(1) $\left|a_{i}-a_{i+1}\right| \neq n-1, i=1,2, \cdots, m-1$;
(2) $a_{1}, a_{2}, \cdots, a_{m}(m \geqslant 3)$ contain at least three different elements.
Find the number of elements in $B_{n}^{m}$ and $B_{6}^{3}$.