Compressed Evaluation of Fibonacci Residues via Pisano Period Factorization
We present a method for evaluating F(n) mod m that exploits the prime factorization of the modulus to replace a single lookup table of size π(m) (the Pisano period of m) with a bank of smaller tables whose combined size is Σπ(fᵢ), where the fᵢ are the prime-power factors of m. The reconstruction uses the Chinese Remainder Theorem. For highly composite moduli the compression is substantial: for m = 30,030 = 2 × 3 × 5 × 7 × 11 × 13, the table size drops from π(30,030) = 1,680 to 85 entries, a reduction of 94.9%. We identify a degenerate case — F(n) mod 2 — that requires no table at all, admitting the closed-form evaluation F(n) mod 2 = [n is not divisible by 3] in O(1). All results are verified computationally on 1,000 random indices per modulus across eight test cases, with zero errors.
Authors
- Burciaga
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-09-16
- DOI
- https://doi.org/10.5281/zenodo.22795423
- Primary Topic
- Cryptography and Residue Arithmetic
- Type
- preprint