Abstract
Prempreesuk, Noppakaew, and Pongsriiam determined the Zeckendorf representation of the multiplicative inverse of 2 modulo \(F_n\), for every positive integer n not divisible by 3, where \(F_n\) denotes the nth Fibonacci number. We determine the Zeckendorf representation of the multiplicative inverse of a modulo \(F_n\), for every fixed integer \(a \ge 3\) and for all positive integers n with \(\gcd (a, F_n) = 1\). Our proof makes use of the socalled base\(\varphi \) expansion of real numbers.
1 Introduction
Let \((F_n)_{n \ge 1}\) be the sequence of Fibonacci numbers, which is defined by the initial conditions \(F_1=F_2=1\) and by the linear recurrence \(F_n=F_{n1} + F_{n2}\) for \(n \ge 3\). It is well known [22] that every positive integer n can be written as a sum of distinct nonconsecutive Fibonacci numbers, that is, \(n = \sum _{i=1}^m d_i F_i\), where \(m \in \mathbb {N}\), \(d_i \in \{0, 1\}\), and \(d_i d_{i+1} = 0\) for all \(i \in \{1, \ldots , m1\}\). This is called the Zeckendorf representation of n and, apart from the equivalent use of \(F_1\) instead of \(F_2\) or vice versa, is unique.
The Zeckendorf representation of integer sequences has been studied in several works. For instance, Filipponi and Freitag [6, 7] studied the Zeckendorf representation of numbers of the form \(F_{kn}/F_n\), \(F_n^2/d\) and \(L_n^2/d\), where \(L_n\) are the Lucas numbers and d is a Lucas or Fibonacci number. Filipponi, Hart, and Sanchis [8, 13, 14] analyzed the Zeckendorf representation of numbers of the form \(mF_n\). Filipponi [8] determined the Zeckendorf representation of \(m F_n F_{n + k}\) and \(mL_n L_{n + k}\) for \(m \in \{1,2,3,4\}\). Bugeaud [3] studied the Zeckendorf representation of smooth numbers. The study of Zeckendorf representations has been also approached from a combinatorial point of view [1, 9, 12, 21]. Moreover, generalizations of the Zeckendorf representation to linear recurrences other than the sequence of Fibonacci numbers have been considered [4, 5, 10, 11, 16].
For all integers a and \(m \ge 1\) with \(\gcd (a, m) = 1\), let \((a^{1} \bmod m)\) denote the least positive multiplicative inverse of a modulo m, that is, the unique \(b \in \{1, \dots , m\}\) such that \({ab \equiv 1} \pmod m\). Prempreesuk, Noppakaew, and Pongsriiam [17] determined the Zeckendorf representation of \((2^{1} \bmod F_n)\), for every positive integer n that is not divisible by 3. (The condition \(3 \not \mid n\) is necessary and sufficient to have \(\gcd (2, F_n) = 1\).) In particular, they showed [17, Theorem 3.2] that
for every integer \(n \ge 8\). We extend their result by determining the Zeckendorf representation of the multiplicative inverse of a modulo \(F_n\), for every fixed integer \(a \ge 3\) and every positive integer n with \(\gcd (a, F_n) = 1\). Precisely, we prove the following result.
Theorem 1.1
Let \(a \ge 3\) be an integer. Then there exist integers \(M, n_0, i_0 \ge 1\) and periodic sequences \(\varvec{z}^{(0)}, \dots , \varvec{z}^{(M  1)}\) and \(\varvec{w}^{(1)}, \dots , \varvec{w}^{(i_0)}\) with values in \(\{0, 1\}\) such that, for all integers \(n \ge n_0\) with \(\gcd (a, F_n) = 1\), the Zeckendorf representation of \((a^{1} \bmod F_n)\) is given by
From the proof of Theorem 1.1 it follows that \(M, n_0, i_0\), \(\varvec{z}^{(0)}, \dots , \varvec{z}^{(M  1)}\), and \(\varvec{w}^{(1)}, \dots , \varvec{w}^{(i_0)}\) can be computed from a (see also Remark 4.1 at the end of the paper).
2 Preliminaries on Fibonacci numbers
Let us recall that for every integer \(n \ge 1\) it holds the Binet formula
where \(\varphi := (1 + \sqrt{5}) / 2\) is the Golden ratio and \(\overline{\varphi } := (1  \sqrt{5}) / 2\) is its algebraic conjugate. Furthermore, it is well known that for every integer \(m \ge 1\) the Fibonacci sequence \((F_n)_{n \ge 1}\) is (purely) periodic modulo m. Let \(\pi (m)\) denote its period length, or the socalled Pisano period.
The next lemma gives a formula for the inverse of a modulo \(F_n\).
Lemma 2.1
For all integers \(a \ge 1\) and \(n \ge 3\) with \(\gcd (a, F_n) = 1\), we have that
where \(b := (F_r^{1} \bmod a)\) and \(r := (n \bmod \pi (a))\).
Proof
Since \(r \equiv n \pmod {\pi (a)}\), we have that \(F_r \equiv F_n \pmod a\). In particular, it follows that \(\gcd (a, F_r) = \gcd (a, F_n) = 1\). Hence, \(F_r\) is invertible modulo a, and consequently b is well defined. Moreover, we have that
and thus \(c := (bF_n + 1) / a\) is an integer. On the one hand, we have that
On the other hand, since \(b \le a  1\) and \(n \ge 3\), we have that
Therefore, we get that \(c = (a^{1} \bmod F_n)\), as desired.
3 Preliminaries on base\(\varphi \) expansion
We need some basic results regarding the socalled base\(\varphi \) expansion of real numbers, which was introduced by Bergman [2] in 1957 (see also [19]), and which is a particular case of noninteger base expansion (see, e.g., [15, 18]). Let \(\mathfrak {D}\) be the set of sequences in \(\{0, 1\}\) that have no two consecutive terms equal to 1, and that are not ultimately equal to the periodic sequence \(0, 1, 0, 1, \dots \). Then for every \(x \in {[0, 1)}\) there exists a unique sequence \(\varvec{\delta }(x) = (\delta _i(x))_{i \in \mathbb {N}}\) in \(\mathfrak {D}\) such that \(x = \sum _{i = 1}^\infty \delta _i(x) \varphi ^{i}\). Precisely, \(\delta _i(x) = \lfloor T^{(i)}(x) \rfloor \) for every \(i \in \mathbb {N}\), where \(T^{(i)}\) denotes the ith iterate of the map \(T : {[0, 1)} \rightarrow {[0, 1)}\) defined by \(T(\hat{x}) := (\varphi \hat{x} \bmod 1)\) for every \(\hat{x} \in {[0, 1)}\). Furthermore, letting \(\mathcal {F} := \mathbb {Q}(\varphi ) \cap {[0,1)}\), if \(x \in \mathcal {F}\) then \(\varvec{\delta }(x)\) is ultimately periodic. In particular, if \(x \in \mathcal {F}\) is given as \(x = x_1 + x_2 \varphi \), where \(x_1, x_2 \in \mathbb {Q}\), then the preperiod and the period of \(\varvec{\delta }(x)\) can be effectively computed by finding the smallest \(i \in \mathbb {N}\) such that \(T^{(i)}(x) = T^{(j)}(x)\) for some \(j \in \mathbb {N}\) with \(j < i\). Conversely, for every ultimately periodic sequence \(\varvec{d} = (d_i)_{i \in \mathbb {N}}\) in \(\mathfrak {D}\) we have that the number \(x = \sum _{i=1}^\infty d_i \varphi ^{i}\) belongs to \(\mathcal {F}\), and \(x_1, x_2 \in \mathbb {Q}\) such that \(x = x_1 + x_2 \varphi \) can be effectively computed in terms of the preperiod and period of \(\varvec{d}\) by using the formula for the sum of the geometric series. Moreover, in the case that x is a rational number in [0, 1) then \(\varvec{\delta }(x)\) is purely periodic [20].
The next lemma collects two easy inequalities for sums involving sequences in \(\mathfrak {D}\).
Lemma 3.1
For every sequence \((d_i)_{i \in \mathbb {N}}\) in \(\mathfrak {D}\) and for every \(m \in \mathbb {N} \cup \{\infty \}\), we have:

(1)
\(\sum _{i = 1}^m d_i \varphi ^{i} \in {[0, 1)}\) and

(2)
\(\sum _{i = 1}^m d_i (\varphi )^{i} \in {(1, \varphi ^{1})}\).
Proof
Since \((d_i)_{i \in \mathbb {N}}\) belongs to \(\mathfrak {D}\), there exists \(k \in \mathbb {N}\) such that \(d_k = d_{k + 1} = 0\). Let k be the minimum integer with such property. Then
and ()(1) is proved. Let us prove ()(2). On the one hand, we have
where the second inequality is strict because \(\mathfrak {D}\) does not contain sequences that are ultimately equal to \((0, 1, 0, 1, \dots )\). On the other hand, similarly, we have
Thus ()(2) is proved.
The following lemma relates base\(\varphi \) expansion and Zeckendorf representation.
Lemma 3.2
Let N be a positive integer and write \(N = x \varphi ^m / \sqrt{5}\) for some \(x \in \mathcal {F}\) and some integer \(m \ge 2\). Then the Zeckendorf representation of N is given by
Moreover, we have \(\delta _m(x) = 0\).
Proof
Let \(R := N  \sum _{i = 1}^{m  1} \delta _{m  i} (x) F_i\). We have to prove that \(R = 0\). Since R is an integer, it suffices to show that \(R < 1\). We have
Hence, we get that
For the sake of contradiction, suppose that \(\delta _m(x) = 1\). Then \(\delta _{m+1}(x) = 0\) and, by Lemma 3.1, it follows that
which is a contradiction, since R is an integer.
Therefore, \(\delta _m(x) = 0\) and, again by Lemma 3.1, we have
so that \(R < 1\), as desired.
The next lemma regards the base\(\varphi \) expansions of the sum of two numbers.
Lemma 3.3
Let \(x, y \in {[0, 1)}\), \(m \in \mathbb {N}\), and put \(v := x + y \varphi ^{m}\). Suppose that there exists \(\lambda \in \mathbb {N}\) such that \(\lambda + 2 \le m\) and \(\delta _\lambda (x) = \delta _{\lambda + 1}(x) = 0\). Then, putting
we have that \(v, w \in {[0, 1)}\) and
for every \(i \in \mathbb {N}\).
Proof
From Lemma 3.1()(1), we have that
Hence, \(w \in {[0,\varphi ^{\lambda })} \subseteq {[0, 1)}\) and so \(w = \sum _{i = \lambda + 1}^\infty \delta _i(w) \varphi ^{i}\). Therefore, recalling that \(\delta _{\lambda + 1}(x) = 0\), we get that
which is the base\(\varphi \) expansion of v. (Note that \(\delta _\lambda (x) = 0\).) In particular, by Lemma 3.1()(1), we have that \(v \in {[0, 1)}\). Thus (1) follows.
4 Proof of Theorem 1.1
Fix an integer \(a \ge 3\). Let us begin by defining \(M, n_0, i_0\), and \(\varvec{z}^{(0)}, \dots , \varvec{z}^{(M  1)}\). Put \(M := \pi (a)\). For each \(r \in \{0, \dots , M  1\}\) with \(\gcd (a, F_r) = 1\), let \(b_r := (F_r^{1} \bmod a)\), \(x_r := b_r / a\), and \(\varvec{z}^{(r)} := \varvec{\delta }(x_r)\). Note that \(x_r \in (0, 1)\). Since \(x_r\) is a positive rational number, we have that \(\varvec{z}^{(r)}\) is a (purely) periodic sequence belonging to \(\mathfrak {D}\). Let \(\ell \) be the least common multiple of the period lengths of \(\varvec{z}^{(0)}, \dots , \varvec{z}^{(M  1)}\), and put \(i_0 := \ell + 3\). Finally, let \(n_0 := \max \{i_0 + 1, \lceil \log (2a) / \!\log \varphi \rceil \}\).
Pick an integer \(n \ge n_0\) with \(\gcd (a, F_n) = 1\) and, for the sake of brevity, put \(r := (n \bmod M)\). From Lemma 2.1 and Binet’s formula (2), we get that
where
Since \(n \ge n_0\), it follows that \(y_n \in (0, 1)\) and \(x_r + y_n \varphi ^{n} \in (0, 1)\). Therefore, from (2) and Lemma 3.2, we get that
Since \(\varvec{\delta }(x_r)\) is (purely) periodic and belongs to \(\mathfrak {D}\), we have that \(\varvec{\delta }(x_r)\) contains infinitely many pairs of consecutive zeros. Furthermore, since the period length of \(\varvec{\delta }(x_r)\) is at most \(\ell \), we have that among every \(\ell +1\) consecutive terms of \(\varvec{\delta }(x_r)\) there are two consecutive zero. In particular, there exists \(\lambda = \lambda (r)\) such that \(n  \ell  3 \le \lambda \le n  2\) and \(\delta _{\lambda }(x_r) = \delta _{\lambda + 1}(x_r) = 0\). Consequently, by Lemma 3.3, we get that \(\delta _i(x_r + y_n \varphi ^{n}) = \delta _i(x_r)\) for each positive integer \(i \le \lambda \) and, a fortiori, for each positive integer \(i \le n  i_0\). Therefore, we have that
where \(\varvec{w}^{(1)}, \cdots , \varvec{w}^{(i_0)}\) are the sequences defined by \(w_n^{(i)} := \delta _{n  i}(x_r + y_n \varphi ^{n})\). Note that, by construction,
is a string in \(\{0,1\}\) with no consecutive zeros. Hence, (3) is the Zeckendorf representation of \((a^{1} \bmod F_n)\).
It remains only to prove that \(\varvec{w}^{(1)}, \cdots , \varvec{w}^{(i_0)}\) are periodic. By (3) and the uniqueness of the Zeckendorf representation, it suffices to prove that
is a periodic function of n. From the last equality in (4), we have that \(0 \le R(n) < \sum _{i \,=\, 1}^{i_0  1} F_i\). (Actually, one can prove that \(0 \le R(n) < F_{i_0}\), but this is not necessary for our proof.) Fix a prime number \(p > \max \{a, \sum _{i \,=\, 1}^{i_0  1} F_i\}\). It suffices to prove that R(n) is periodic modulo p. Recalling that \((a^{1} \bmod F_n) = (b_r F_n + 1) / a\) and that the sequence of Fibonacci numbers is periodic modulo p, it follows that \((a^{1} \bmod F_n)\) is periodic modulo p. Hence, it suffices to prove that \(R^\prime (n) := \sum _{i = i_0}^{n  1} z_{n  i}^{(r)} F_i\) is periodic modulo p. Using that \(\varvec{z}^{(r)}\) has period length dividing \(\ell \), we get that
which is a linear combination of sequences that are periodic modulo p. Hence \(R^\prime (n)\) is periodic modulo p. The proof is complete.
Remark 4.1
The proof of Theorem 1.1 provides a way to compute the positive integers \(M, i_0, n_0\) and the periods of the periodic sequences \(\varvec{z}^{(0)}, \dots , \varvec{z}^{(M  1)}\) and \(\varvec{w}^{(1)}, \dots , \varvec{w}^{(i_0)}\). Indeed, going through the proof, we have that: \(M = \pi (a)\) is the Pisano period of a, which can be computed in an obvious way; \(\varvec{z}^{(r)} = \varvec{\delta }\big ((F_r^{1}\!\!\! \mod a) / a\big )\) and so the period of \(\varvec{z}^{(r)}\) can be computed as explained at the beginning of Section 3; \(i_0\) and \(n_0\) have simple formulas in terms of \(\ell \), which is the least common multiple of the period lengths of \(\varvec{z}^{(0)}, \dots , \varvec{z}^{(M  1)}\). Finally, the periods of \(\varvec{w}^{(1)}, \dots , \varvec{w}^{(i_0)}\) can be computed from (4) and the fact that R(n) is periodic with period length at most \(\pi (p)^2 \ell M\), which follows from the arguments after (4). However, note that proceeding in this way might be impractical, since \(\ell \) might be exponential in M, and thus p might be double exponential in M; making the search for the periods of \(\varvec{w}^{(1)}, \dots , \varvec{w}^{(i_0)}\) extremely long.
Data Availability Statement
Data sharing not applicable to this article as no datasets were generated or analysed during the current study.
References
Artz, J., Rowell, M.: A tiling approach to Fibonacci product identities. Involve 2(5), 581–587 (2009)
Bergman, G.: A number system with an irrational base. Math. Mag. 31, 98–110 (1957/58)
Bugeaud, Y.: On the Zeckendorf representation of smooth numbers. Moscow Math. J. 21(1), 31–42 (2021)
Daykin, D.E.: Representation of natural numbers as sums of generalized Fibonacci numbers. J. London Mathematical Society 35, 143–160 (1960)
Demontigny, P., Do, T., Kulkarni, A., Miller, S.J., Moon, D., Varma, U.: Generalizing Zeckendorf’s Theorem to fdecompositions. J. Number Theory 141, 136–158 (2014)
Filipponi, P., Freitag, H.T.: On the \(F\)Representation of Integral Sequences \(\{F_n^2/d\}\) and \(\{L_n^2/d\}\) where \(d\) is Either a Fibonacci or a Lucas Number. Fibonacci Quart. 27(3), 276–282 (1989)
Filipponi, P., Freitag, H.T.: The Zeckendorf Representation of \(\{F_{kn}/F_n\}\). Applications of Fibonacci Numbers 5, 217–19 (1993)
Filipponi, P., Hart, E.L.: The Zeckendorf decomposition of certain FibonacciLucas products. Fibonacci Quart. 36(3), 240–247 (1998)
Gerdemann, D.: Combinatorial proofs of Zeckendorf family identities. Fibonacci Quart. 46(47), 249–261 (2009)
Grabner, P.J., Tichy, R.F.: Contributions to digit expansions with respect to linear recurrences. J. Number Theory 35, 160–169 (1990)
Grabner, P.J., Tichy, R.F.: Generalized Zeckendorf expansions. Appl. Math. Lett. 7(2), 25–28 (1994)
McGregor, D., Rowell, M.J.: Combinatorial proofs of Zeckendorf representations of Fibonacci and Lucas products. Involve 4(1), 75–89 (2011)
Hart, E.L.: On Using Patterns in BetaExpansions To Study FibonacciLucas Products. Fibonacci Quart. 36, 396–406 (1998)
Hart, E., Sanchis, L.: On the occurence of \(F_n\) in the Zeckendorf decomposition of \(n F_n\). Fibonacci Quart. 37, 21–33 (1999)
Parry, W.: On the \(\beta \)expansions of real numbers. Acta Math. Acad. Sci. Hungar. 11, 401–416 (1960)
Pethö, A., Tichy, R.F.: On digit expansions with respect to linear recurrences. J. Number Th. 33, 243–256 (1989)
Prempreesuk, B., Noppakaew, P., Pongsriiam, P.: Zeckendorf representation and multiplicative inverse of \(F_m \;\text{ mod } \;F_n\). Int. J. Math. Comput. Sci. 15(1), 17–25 (2020)
Rényi, A.: Representations for real numbers and their ergodic properties. Acta Math. Acad. Sci. Hungar. 8, 477–493 (1957)
Rousseau, C.: The phi number system revisited. Math. Mag. 68(4), 283–284 (1995)
Schmidt, K.: On periodic expansions of Pisot numbers and Salem numbers. Bull. London Math. Soc. 12, 269–278 (1980)
Wood, P.M.: Bijective proofs for Fibonacci identities related to Zeckendorf’s theorem. Fibonacci Quart. 45(2), 138–145 (2007)
Zeckendorf, E.: Répresentation des nombres naturels par une somme de nombres de Fibonacci ou de nombres de Lucas. Bull. Soc. Roy. Sci. Liege 41, 179–82 (1972)
Acknowledgements
The authors are members of GNSAGA of INdAM and of CrypTO, the group of Cryptography and Number Theory of Politecnico di Torino.
Funding
Open access funding provided by Università degli Studi di Trento within the CRUICARE Agreement.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Adrian Constantin.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Alecci, G., Murru, N. & Sanna, C. Zeckendorf representation of multiplicative inverses modulo a Fibonacci number. Monatsh Math (2022). https://doi.org/10.1007/s0060502201724y
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s0060502201724y
Keywords
 Base\(\varphi \) expansion
 Fibonacci number
 Multiplicative inverse
 Zeckendorf representation
Mathematics Subject Classification
 Primary 11B39
 Secondary 11A67
 11A99