Linear recurrence sequences

Indexed zeroness for linear recurrence sequences

A term at a binary index has a compact repeated-power circuit even when its integer expansion is enormous. Exact zeroness is equivalent to testing one entry of an integer matrix power and belongs to both coRP and coNP. Deterministic polynomial time remains unresolved here.

FPRD-LRS-D01 · input model

The indexed zero question

An order-dd rational linear recurrence sequence is supplied by binary-encoded initial values and coefficients satisfying

fk+d=∑i=0d−1cifk+i.f_{k+d}=\sum_{i=0}^{d-1}c_i f_{k+i}.

The index nn is also binary encoded. The decision problem asks only whether fn=0f_n=0; it does not ask for the full expansion of fnf_n.

The public source specifies a rational LRS and a binary index but not a concrete syntax. This page fixes the ordinary explicit recurrence representation above. Rational generating functions, weighted automata, closed forms, or succinct recurrence order are different input models and are not covered automatically.

FPRD-LRS-T01 · proposition

A zero-preserving integer normalization

Choose positive common multiples QQ of the coefficient denominators and EE of the initial-value denominators. Put

gk=EQkfk.g_k=EQ^k f_k.

Proposition. The sequence gg is an integer LRS of polynomial description size, and fn=0f_n=0 exactly when gn=0g_n=0.

Proof. Substitution gives

gk+d=∑i=0d−1ciQd−igk+i.g_{k+d}=\sum_{i=0}^{d-1}c_iQ^{d-i}g_{k+i}.

Every new coefficient is integral, and the scale EQnEQ^n is nonzero. The common multiples and scaled data have polynomial bit length. ∎

Clearing recurrence denominators only once is not valid; the index-dependent factor QkQ^k is essential.

FPRD-LRS-T02 · theorem

Equivalence with a binary matrix-power entry

A companion representation gives an integer matrix AA, row α\alpha, and column β\beta with

gn=αAnβ.g_n=\alpha A^n\beta.

Use the block matrix

M=(0α00Aβ000).M=\begin{pmatrix}0&\alpha&0\\0&A&\beta\\0&0&0\end{pmatrix}.

Then (Mn+2)1,d+2=gn(M^{n+2})_{1,d+2}=g_n. Conversely, every entry sequence (Mk)s,t(M^k)_{s,t} satisfies the characteristic recurrence of MM by Cayley–Hamilton.

Theorem. Indexed LRS zeroness and binary matrix-power entry zeroness are polynomial-time equivalent.

FPRD-LRS-T03 · randomized upper bound

A compact circuit and a one-sided zero test

Repeated squaring builds a division-free integer circuit for the selected entry using O(d3log⁡n)O(d^3\log n) arithmetic gates with ordinary matrix multiplication.

Proposition. Indexed LRS zeroness belongs to coRP\mathsf{coRP}.

This is a direct many-one reduction to integer straight-line- program zeroness, usually called EquSLP. Schönhage's standard randomized modular argument places EquSLP incoRP\mathsf{coRP}: zero outputs remain zero modulo every sampled prime, while the sampling range is chosen from the circuit-size growth bound so that a nonzero output is missed with probability at most one half. Independent repetition reduces that one-sided error.

“Choose a random large prime” without a circuit-dependent range is not a proof. The proposition imports the quantified EquSLP upper bound; it asserts no reverse reduction, EquSLP hardness, or deterministic algorithm.

FPRD-LRS-T04 · certificate upper bound

A short certificate for nonzeroness

Proposition. Indexed LRS zeroness belongs to coNP\mathsf{coNP}.

Proof. If a division-free circuit has ss gates and hh-bit constants, a gate induction gives the coarse bound

log⁡2(∣z∣+1)≤2s(h+s+1)\log_2(|z|+1)\le 2^s(h+s+1)

for its output. A nonzero zz therefore has at most that many distinct prime divisors. More primes exist below a bound with polynomially many bits, so some polynomial-bit prime pp satisfies z≢0(modp)z\not\equiv0\pmod p. Verify primality and evaluate every gate modulo pp. This is an NP certificate for nonzeroness. ∎

The prime-size step uses a standard upper bound on thekkth prime; deterministic polynomial-time verification of primality is supplied by Agrawal–Kayal–Saxena. The certificate does not require factoring the circuit output.

FPRD-LRS-F01 · failed approach

Why explicit powering is not enough

The order-one recurrenceu0=1,uk+1=2uku_0=1,\qquad u_{k+1}=2u_khas un=2nu_n=2^n, whose binary expansion has n+1n+1 bits. A binary index of length ℓ\ell can therefore request an output with 2Θ(ℓ)2^{\Theta(\ell)} bits.

This rules out explicit expansion as a general polynomial-time strategy. It is not a hardness result for zeroness—the example itself is trivially nonzero.

FPRD-LRS-B01 · open boundary

The deterministic question remains

The present work separates compact representation, randomized one-sided verification, nondeterministic nonzero certificates, and deterministic decision. It does not provide a deterministic polynomial-time zero test. Nor does it prove that these structured repeated-power circuits are as hard as general EquSLP.

A fixed polynomial list of moduli is insufficient: a nonzero term may be divisible by every prime in that list. Promising narrower targets include fixed order, diagonalizable characteristic polynomials, nondegenerate recurrences, and restricted coefficient semigroups.

Sources

Problem source. Efficient LRS evaluation, contributed by Lorenzo Clemente to Automata Exchange.

Jakub D. Bacik, Joël Ouaknine, and James Worrell use iterated matrix powering and the EquSLP zero test as a subroutine in “On the Complexity of the Skolem Problem at Low Orders”, arXiv:2507.11234v2 (24 October 2025). Their Theorem 3.1 concerns bounded Skolem at each fixed order; here it is cited only for the circuit-zero subroutine, not as a solution of the variable-order indexed problem.

Arnold Schönhage, “On the Power of Random Access Machines”, ICALP 1979, LNCS 71, pp. 520–529, DOI 10.1007/3-540-09510-1_42, supplies the classical randomized straight-line-program upper bound. The escaping-prime certificate uses Rosser and Schoenfeld's prime bounds, Illinois Journal of Mathematics 6 (1962), 64–94, DOI 10.1215/ijm/1255631807, and Agrawal, Kayal, and Saxena, “PRIMES is in P”, Annals of Mathematics 160 (2004), 781–793, DOI 10.4007/annals.2004.160.781.

The independent finite audit checks 1,852 rational normalizations, 29,632 companion/block-matrix identities, 30,982 normalization and zero-preservation equalities, and 1,812 escaping-prime witnesses. Those computations corroborate the reductions; the asymptotic complexity bounds rest on the written arguments and cited theorems.