1

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.

Bill Dubuque
  • 272,048
alexhak
  • 211
  • 1
  • 6
  • 1
    There are only finitely many $m$-tuples of remainders modulo $p$. As soon as the $m$-tuple formed by $m$ consecutive terms of the sequence re-appears, the next term would be the same as the first time the $m$-tuple occurred. It $a_k$ is the coefficient with smallest $k$ that is not divisible by $p$, then you can solve for $x_{i+k}$ in terms of $x_{i+k+1},...,x_{i+m}$, since $a_k$ has an inverse modulo $p$. – plop May 19 '21 at 01:24
  • @plop Thanks for the answer! But this does not give the periodicity from the beginning of the sequence. For example, the sequence $${1, 2, 2^2, 2^3, 2^4,...}$$ and $p=4$ give $${1, 2, 0, 0, 0, ...}$$ It will not be reversible, since there is ${1, 2}$ at the beginning – alexhak May 19 '21 at 01:29
  • 1
    \pmod{p} automatically gives the spacing and the parentheses for the expression. – Arturo Magidin May 19 '21 at 01:34
  • 1
    I see, you don't want $p$ prime. Note that $2$ doesn't have an inverse modulo $4$. Then. as you have shown the statement is not true in that case. In the linked question they are talking about $p$ being a prime. – plop May 19 '21 at 01:34
  • I call this reinventing the wheel (cycle). Alas, such reinventions happen far too frequently.. – Bill Dubuque May 19 '21 at 01:41

0 Answers0