A constant-recursive sequence is $$x_{i+m} = a_{m-1}x_{i+m-1} + a_{m-2}x_{i+m-2} + \cdots + a_0x_i,\tag{*} $$ where $m$ is the order of sequence and $a_i$ is integer.
If we take it by $\bmod p$, we get:
$${x_{i + m}} = {a_{m - 1}}{x_{i + m - 1}} + {a_{m - 2}}{x_{i + m - 2}} + \cdots + {a_0}{x_i}\pmod{p}$$
How can we prove that if not $p{|}{a_j}$ for all $j \in 0,...,m - 1$, then we get a reversible periodic sequence $\bmod p$?
This fact is used, for example, here.
\pmod{p}
automatically gives the spacing and the parentheses for the expression. – Arturo Magidin May 19 '21 at 01:34