arXiv:2610.34300math.NTOct 2026

Manuscript Offprint

arXiv:2610.34300

Three Quadratic Recurrences Modulo 3: What We Can Prove and What We Can Guess

Steven Finch

Abstract

We study three innocent-looking recurrences modulo 3, each built from squares of two earlier terms. One of them turns out to be secretly linear, and we can compute its periods exactly. One is a permutation hiding a small, perfectly orderly piece inside a large, random-looking one. The third looks thoroughly random, but it still has a few provable features. Along the way we meet open problems that need nothing beyond a first course in abstract algebra to state. This paper is a starting point, not the final word in any sense.

1 The setup

Fix an integer k≥1k \ge 1 and start a sequence x1,x2,…x_1, x_2, \dots of elements of Z/3={0,1,2}\mathbb{Z}/3 = \{0, 1, 2\} with

x1=x2=⋯=xk−1=0,xk=1.x_{1}=x_{2}=\cdots=x_{k-1}=0,\qquad x_{k}=1.

We continue it with one of three rules (all arithmetic mod 3):

(A)

xn=xn−1+xn−k2,x_{n}=x_{n-1}+x_{n-k}^{2},

(B)

xn=xn−12+xn−k,x_{n}=x_{n-1}^{2}+x_{n-k},

(C)

xn=2(xn−12+xn−1+xn−k2+xn−k).x_{n}=2\big(x_{n-1}^{2}+x_{n-1}+x_{n-k}^{2}+x_{n-k}\big).

Each new term depends on the previous kk terms, and there are only 3k3^k possible blocks of kk terms. So every sequence is eventually periodic: there are a least period N≥1N \ge 1 and a least pre-period μ≥0\mu \ge 0 such that xn+N=xnx_{n+N} = x_n for all n>μn > \mu. We write NA(k),NB(k),NC(k)N_A(k), N_B(k), N_C(k) (and similarly μ\mu) for the three rules.

The one trick we need. Write [P][P] for 1 if the statement PP is true and 0 if it is false.

Lemma 1. For c∈Z/3c \in \mathbb{Z}/3 we have c2=[c≠0]c^2 = [c \neq 0] and 2(c2+c)=[c=1]2(c^2 + c) = [c = 1].

Proof. Check the three cases:

\begin{array}{c|ccc}{{{c}}}&{{{0}}}&{{{1}}}&{{{2}}} \\{{{\hline c^{2}}}}&{{{0}}}&{{{1}}}&{{{1}}} \\{{{\hline 2(c^{2}+c)}}}&{{{0}}}&{{{1}}}&{{{0}}} \\\end{array}

□\square

So the three rules really read

(A) xn=xn−1+[xn−k≠0],x_{n} = x_{n - 1} + [x_{n - k} \neq 0],

(B) xn=xn−k+[xn−1≠0],x_{n} = x_{n - k} + [x_{n - 1} \neq 0],

(C) xn=[xn−1=1]+[xn−k=1].x_{n} = [x_{n - 1} = 1] + [x_{n - k} = 1].

Rules (A) and (B) use the same two ingredients with the lags swapped. As we will see, they behave completely differently.