1 Introduction

An integer sequence \(\{u_n\}_{n\ge 0}=\{u_n(r,w,u_0,u_1)\}_{n\ge 0}\) is a binary linear recurrence if the recurrence relation

$$\begin{aligned} u_n=ru_{n-1}+wu_{n-2} \quad (n \ge 2) \end{aligned}$$
(1.1)

holds, where \(r,w\in {\mathbb {Z}}\backslash \{0\}\) and \(u_0,u_1\) are integers not both zero. The polynomial \(f(x)=x^2-rx-w\) attached to recurrence (1.1) is called the characteristic polynomial of the sequence \(\{u_n\}_{n\ge 0}\). We denote the discriminant of f by \(\Delta \) and assume that \(\Delta \ne 0\). Let \(\alpha \) and \(\beta \) be the roots of f with the convention that \(|\alpha | \ge |\beta |\). Putting

$$\begin{aligned} c=\frac{u_1-u_0\beta }{\alpha -\beta } \quad \text {and} \quad d=\frac{u_0\alpha -u_1}{\alpha -\beta } \end{aligned}$$
(1.2)

it is well-known that the formula

$$\begin{aligned} u_n=c\alpha ^n+d\beta ^n\qquad \text { holds for all}\quad n\ge 0. \end{aligned}$$
(1.3)

For later use we fix the notation

$$\begin{aligned} Y:=\max \{|u_0|, |u_1|, |r|, |w|\}. \end{aligned}$$
(1.4)

The sequence \(\{u_n\}_{n\ge 0}\) is called non-degenerate, if \(cd\alpha \beta \ne 0\) and \(\alpha /\beta \) is not a root of unity. Taking \(r=w=u_1=1,~ u_0=0\) the sequence \(\{u_n\}_{n \ge 0}\) becomes the classical Fibonacci sequence usually denoted by \(\{F_n\}_{n \ge 0}\) for which \(\alpha =(1+\sqrt{5})/2\) and \(\beta =(1-\sqrt{5})/2\). Grossman and Luca [2] showed that for fixed positive integers A and k, the Diophantine equation

$$\begin{aligned} u_n = \sum _{i=1}^{k}{a_im_i!} \quad \text {with} \quad |a_i| \le A \end{aligned}$$
(1.5)

implies that

$$\begin{aligned} n \le c_1, \end{aligned}$$
(1.6)

where \(c_1=c_1(k,A)\) is an effectively computable constant depending only on k and A. Taking \(A=1\) and \(k=2\), it was shown in the same paper that \(F_{12}=4!+5!\) is the largest Fibonacci number which is a sum or difference of two factorials. Further, in [1], it was shown that \(F_7=1!+3!+3!\) is the largest Fibonacci number which is a sum of three factorials.

Let \(S=\{p_1, \ldots , p_l\}\) be a finite set of primes labelled \(p_1< \dots <p_l\) and \(P=p_l(=\max \{p_1, \ldots , p_l\})\). We denote by \({\mathscr {S}}\) the set of all positive integers whose prime factors are all in S. In particular, \(0 \not \in {\mathscr {S}}\) but \(1 \in {\mathscr {S}}\). In [3], the problem of representing \(u_n\) as a sum between a factorial and an element from \({\mathscr {S}}\) was considered. Namely, it was proven that for given integers AB, the equation

$$\begin{aligned} u_n=Am!+Bs \quad \text {in} \ n,m \in {\mathbb {Z}}\ \text {and} \ s \in {\mathscr {S}}\end{aligned}$$

implies that \(n \le c_2\) holds for all solutions n which are non-trivial (see the terminology of that paper for nontrivial; for example, when \(u_n=2^n+1\), the solution with \(m_1=1\), \(s=2^{n}\) for any n when \(S=\{2\}\) is trivial). Here, \(c_2\) is an explicit constant depending only on ABS and the sequence \(\textbf{u}=\{u_n\}_{n \ge 0}\). As a numerical application, in [3] it was shown that \(F_{24}=8!+2^53^37^1\) is the largest Fibonacci number of the form \(F_n = \pm m! \pm 2^a3^b5^c7^d\); thus the largest solution when \(\textbf{u}=\{F_n\}_{n\ge 0}\), \(A=B=1\) and \(S=\{2,3,5,7\}\).

2 Our Results

For an integer m denote by P(m) the greatest prime factor of m with the convention that \(P(0)=P(\pm 1)=1\). As before, \(\{u_n\}_{n \ge 0}\) is a non-degenerate binary recurrence sequence. Further, let \(k \ge 1\) and \(A \ge 1\) be fixed positive integers.

In view of Theorem 1 of Grossman and Luca [2] (see (1.5) and (1.6)) we have that \(u_n-\sum _{i=1}^{k}{a_im_i!} \ne 0\) for all integers \(a_1,\ldots ,a_k\) with \(|a_i|\le A\) for \(i=1,\ldots ,k\), whenever \(n>c_1\). Therefore, it is natural to examine the parameter

$$\begin{aligned} P\left( u_n-\sum _{i=1}^{k}{a_im_i!}\right) . \end{aligned}$$
(2.1)

In this paper, we study the quantity (2.1) when \(\textbf{u}\) has \(\Delta >0\) and \(w=\pm 1\). Without loss of generality (or, replacing A by kA if needed) we assume that the unknowns \(m_i \ (i=1,\ldots ,k)\) satisfy

$$\begin{aligned} m_1>m_2> \cdots >m_k\ge 1. \end{aligned}$$
(2.2)

Our main result below implies that

$$\begin{aligned} P\left( u_n-\sum _{i=1}^{k}{a_im_i!}\right) \rightarrow \infty \quad \text {as} \quad n \rightarrow \infty \end{aligned}$$

in an effective way. Namely, we have the following result.

Theorem 2.1

Let \(\{u_n\}_{n \ge 0}\) be a non-degenerate binary sequence with \(\Delta >0\) and \(w=\pm 1\). Assume that \(|a_i| \le A\) for \(i=1,\ldots ,k\) and the unknowns \(m_i\) satisfy (2.2). Put \(c_3:=16(Y+2)\log (Y+2), c_4:=5.6 \cdot 10^{17} \log ^2(Y+2)\) and let \(n_1:=n_1(k)\) be the largest integer solution of the inequality

$$\begin{aligned} n<2.08 \cdot \left( \log (4(A+1))+21.6 c_4 \log ^2{n}\right) ^{k}. \end{aligned}$$

Then

$$\begin{aligned} P\left( u_n-\sum _{i=1}^k{a_im_i!}\right) >c_5(n), \end{aligned}$$
(2.3)

whenever \(n > c_6\), where

$$\begin{aligned} c_5(n):=\left( \frac{n}{2.08}\right) ^{\frac{1}{3k+3}}\left( \frac{\log (4A)}{8}+2.7c_4\log ^2{n}\right) ^{-\frac{1}{3}} \end{aligned}$$

and

$$\begin{aligned} c_6:=\max \{c_3,n_1\}. \end{aligned}$$

As a direct consequence of Theorem 2.1, we have the following result.

Theorem 2.2

Let \(\{u_n\}_{n \ge 0}\) be a non-degenerate binary sequence with \(\Delta >0\) and \(w=\pm 1\) and let \(S=\{p_1,\ldots ,p_l\}\) be a finite set of primes. Put \(P:=\max \{p_1,\ldots ,p_l\}\). We denote by \({\mathscr {S}}\) the set of all rational integers whose prime factors are all in S. Further, let \(k \ge 1\) and \(A \ge 1\) be fixed positive integers. Consider the Diophantine equation

$$\begin{aligned} u_n=a_1m_1!+\cdots +a_km_k!+bs,\qquad \max \{|a_1|, |a_2|, \ldots , |a_k|, |b|\} \le A \end{aligned}$$
(2.4)

in integer unknowns \((m_1,m_2,\ldots ,m_k,s)\) satisfying \(s \in {\mathscr {S}}\) and (2.2). Then

$$\begin{aligned} n \le c_7:=\max \{c_6,c_8\}, \end{aligned}$$
(2.5)

where \(c_6\) and \(c_4\) are defined in the statement of Theorem 2.1 and

$$\begin{aligned} c_8:=\max \left\{ 2^{2k+2} \, c_9 \, \log ^{2k+2}\left( (2k+2)^{2k+2} \, c_9\right) , (4 \textrm{e}^2)^{2k+2} \right\} \end{aligned}$$

with

$$\begin{aligned} c_9:=2.08 \cdot (\max \{P,A\})^{3k+3} \cdot (2c_4\log (4A))^{k+1}. \end{aligned}$$

Finally, to show the strength of our above result we completely solve a simple equation of the above shape.

Theorem 2.3

Let \(\{F_n\}_{n\ge 0}\) denote the Fibonacci sequence and \(S:=\{2,3,5,7\}\). Denote by \({\mathscr {S}}\) the set of all positive integers which have no prime factor outside of S. Then all solutions of the equation

$$\begin{aligned} F_n=m_1!+m_2!+s \quad \quad \quad \text { in }n,m_1,m_2,s\in {\mathbb {N}}, m_1>m_2, s\in {\mathscr {S}}\end{aligned}$$
(2.6)

are given by

$$\begin{aligned} \begin{aligned}&[n, m_1, m_2, s] \in \left\{ [ 5, 2, 1, 2 ], [ 6, 2, 1, 5 ],[ 6, 3, 1, 1 ], [ 7, 2, 1, 10 ], [ 7, 3, 1, 6 ], [ 7, 3, 2, 5 ], \right. \\&[ 8, 2, 1, 18 ],[ 8, 3, 1, 14 ], [ 9, 3, 1, 27 ], [ 9, 4, 1, 9 ], [ 9, 4, 2, 8 ], [ 9, 4, 3, 4 ], \\&[ 10, 3, 1, 48 ], [ 10, 4, 1, 30 ], [ 10, 4, 3, 25 ], [ 11, 4, 1, 64 ], [ 11, 3, 2, 81 ], \\&[ 11, 4, 2, 63 ], [ 12, 5, 3, 18 ], [ 13, 5, 1, 112 ], [ 13, 3, 2, 225 ], [ 14, 5, 1, 256 ], \\&[ 16, 3, 1, 980 ], [ 16, 6, 4, 243 ], [ 16, 6, 5, 147 ], [ 17, 6, 2, 875 ], \\&\left. [ 20, 7, 4, 1701 ],[ 24, 8, 7, 1008 ], [ 25, 4, 1, 75000 ], [ 25, 7, 1, 69984 ] \right\} . \end{aligned} \end{aligned}$$

3 Linear Forms in p-Adic Logarithms

In this section, we shall present the p-adic version of a lower bound for linear forms in logarithms of algebraic numbers due to Kunrui Yu [10]. We begin by recalling some basic notions from algebraic number theory. For an algebraic number \(\eta \) of degree d over \({\mathbb {Q}}\), we define the absolute logarithmic height of \(\eta \) by the formula

$$\begin{aligned} h(\eta )= \dfrac{1}{d} \left( \log \vert a_{0} \vert + \sum \limits _{i=1}^{d} \log \max \left( 1, \vert \eta ^{(i)}\vert \right) \right) , \end{aligned}$$

where \(a_{0}\) is the leading coefficient of the minimal polynomial of \(\eta \) over \({\mathbb {Z}}\) and \(\eta ^{(i)}-\)s are the conjugates of \(\eta \) in the field of complex numbers.

Let \({{\mathbb {L}}}\) be an algebraic number field of degree \(d_{\mathbb L}\) and denote by \({\mathcal {O}}_{{\mathbb {L}}}\) the ring of integers of \({\mathbb {L}}\). Let \(\pi \) be a prime ideal in \({\mathcal {O}}_{{\mathbb {L}}}\) and denote by \(e_{\pi }\) the ramification index of \(\pi \), and by \(f_{\pi }\) the residue class degree of \(\pi \). For the unique prime number \(p\in {\mathbb {Z}}\) such that \(\pi \mid p{{\mathcal {O}}}_{{\mathbb {L}}}\), we say that \(\pi \) lies above p. Further, it is well known that

$$\begin{aligned} p{{\mathcal {O}}}_{{\mathbb {L}}}=\prod _{i=1}^g \pi _i^{e_i}, \end{aligned}$$

where \(\pi _1,\ldots ,\pi _g\) are prime ideals of \({\mathcal {O}}_{{\mathbb {L}}}\). The prime ideal \(\pi \) is one of the primes \(\pi _i\), say \(\pi _1\), and its \(e_{\pi }\) equals \(e_1\). The number \(f_{\pi }\) is the dimension of the finite field \({\mathcal O}_{{\mathbb {L}}}/\pi \) over its prime field \({\mathbb {Z}}/p{\mathbb {Z}}\), or, equivalently, can be computed via the formula \(\#\left( {\mathcal O}_{{\mathbb {L}}}/\pi \right) =p^{f_{\pi }}\). In the special case \({{\mathbb {L}}}={{\mathbb {Q}}}\) we have \(\pi =p\) and \(d_{\mathbb L}=e_{\pi }=f_{\pi }=1\).

For a non-zero algebraic number \(\gamma \in {\mathbb {L}}\) we write \(\nu _\pi (\gamma )\) for the exponent of \(\pi \) in the factorization in prime ideals of the principal fractional ideal \(\gamma {\mathcal O}_{{\mathbb {L}}}\). It is well known that for every non-zero integer j and prime ideal \(\pi \) of \({\mathcal {O}}_{{\mathbb {L}}}\) lying above the rational prime p we have

$$\begin{aligned} \nu _p(j)=\frac{1}{e_{\pi }}\nu _{\pi }(j). \end{aligned}$$
(3.1)

Let \(\eta _1,\ldots ,\eta _l\) be non-zero algebraic numbers in \({{\mathbb {L}}}\) and let

$$\begin{aligned} \varLambda =\prod _{i=1}^l \eta _i^{d_i}-1, \end{aligned}$$
(3.2)

where \(d_1,\ldots ,d_l \in {\mathbb {Z}}\).

With the above definitions and notations, Yu [10] proved the following result.

Lemma 3.1

Let \(\pi \) be a prime ideal in \({\mathcal {O}}_{{\mathbb {L}}}\) lying above the rational prime p with the convention that \(\pi =p\) and \(d_{{\mathbb {L}}}=e_{\pi }=f_{\pi }=1\) if \({\mathbb {L}}={\mathbb {Q}}\). Consider the linear form \(\varLambda \) defined by (3.2) and let

$$\begin{aligned} D\ge \max \{|d_1|,\ldots ,|d_l|,3\}, \end{aligned}$$
(3.3)

and

$$\begin{aligned} H_j\ge \max \{h(\alpha _i),\log p\} \quad (1 \le i \le l). \end{aligned}$$
(3.4)

If \(\Lambda \ne 0\), then

$$\begin{aligned} \nu _{\pi }(\Lambda )\le 19(20{\sqrt{l+1}}d_{\mathbb L})^{2(l+1)}e_{\pi }^{l-1} \frac{p^{f_{\pi }}}{(f_{\pi }\log p)^2}\log (e^5 l d_{{\mathbb {L}}})H_1\cdots H_l \log {D}.\qquad \end{aligned}$$
(3.5)

Following Lenstra, Lenstra and Lovász [5], we recall the definition of an LLL-reduced basis of a lattice \({\mathcal {L}}\subset {\mathbb {R}}^n\). For a basis \(\{b_1,b_2,\ldots ,b_n\}\) of the lattice \({\mathcal {L}}\) the Gram-Schmidt procedure provides an orthogonal basis \(\{b_1^{*}, b_2^{*},\ldots ,b_n^{*}\}\) of \({\mathcal {L}}\) with respect to the inner product \(\langle \cdot , \cdot \rangle \) of \({\mathbb {R}}^n\) given inductively by

$$\begin{aligned} b_i^{*}=b_i-\sum _{j=1}^{i-1}{\mu _{ij}b_j^{*}} \quad (1 \le i \le n), \quad \mu _{i,j}=\frac{\langle b_i,b_j^{*}\rangle }{\langle b_j^{*},b_j^{*}\rangle } \quad (1 \le j<i \le n). \end{aligned}$$

We call a basis \(\{b_1,b_2,\ldots ,b_n\}\) for a lattice \({\mathcal {L}}\) LLL-reduced if

$$\begin{aligned} \Vert \mu _{i,j}\Vert \le \frac{1}{2} \quad (1 \le j<i \le n) \end{aligned}$$

and

$$\begin{aligned} \Vert b_i^{*}+\mu _{i, i-1}b_{i-1}^{*}\Vert ^2 \ge \frac{3}{4}\Vert b_{i-1}^{*}\Vert ^2 \quad (1 <i \le n), \end{aligned}$$

where \(\Vert .\Vert \) denotes the ordinary Euclidean length.

To reduce the initial upper bounds for the parameters, we shall also need the following three standard lemmas.

Lemma 3.2

Let \(b_1, \dots ,b_n\) be an LLL-reduced basis of a lattice \({\mathcal {L}}\subset {\mathbb {R}}^n\). Then \(c_6:=||b_1||^2/2^{n-1}\) is a lower bound for the length of the shortest vector of \({\mathcal {L}}\).

Proof

This is a simplified version of Theorem 5.9 of [9]. \(\square \)

Lemma 3.3

Let \(\alpha _1, \dots , \alpha _n\in {\mathbb {R}}\) be real numbers and \(x_1, \dots , x_n \in {\mathbb {Z}}\) with \(|x_i| \le X_i\). Put \(X_0:=\max X_i\), \(S:=\sum _{i=1}^{n-1} X_i^2\), \(T:=0.5+0.5\cdot \sum _{i=1}^n X_i\) and assume that

$$\begin{aligned} \left| \sum _{i=1}^n x_i\alpha _i \right| \le c_2\exp \left\{ -c_5H^q \right\} \end{aligned}$$

holds for some positive real constants \(c_2, c_5, H\) and positive integer q. Let \(C\ge (nX_0)^n\) and let \({\mathcal {L}}\) denote the lattice of \({\mathbb {R}}^n\) generated by the columns of the matrix

$$\begin{aligned} \begin{pmatrix} 1 &{} \dots &{} 0 &{} 0 \\ \ {} &{} \ddots &{} \ {} &{} \ \\ 0 &{} \dots &{} 1 &{} 0 &{} \\ [C\alpha _1] &{} \dots &{} [C\alpha _{n-1}] &{} [C\alpha _n] \end{pmatrix} \in {\mathbb {Z}}^{n\times n}. \end{aligned}$$

Let \(c_6\) denote a lower bound on the length of the shortest non-zero vector of the lattice \({\mathcal {L}}\). If \(c_6^2 > T^2+S\) then we have either

$$\begin{aligned} H\le \root q \of {\frac{1}{c_5} \left( \log (Cc_2)-\log \left( \sqrt{c_6^2-S}-T \right) \right) }, \end{aligned}$$

or

$$\begin{aligned} x_1=x_2=\dots = x_{n-1}=0, \quad \quad x_n=- \frac{[C\alpha _0]}{C\alpha _n}. \end{aligned}$$

Proof

This is Lemma VI.I of [9]. \(\square \)

Lemma 3.4

Let \(z \in {\mathbb {C}}\) with \(|z-1|\le a\in (0,1)\). Then

$$\begin{aligned} |\log z|\le \frac{-\log (1-a)}{a}|z-1|. \end{aligned}$$

Proof

This is Lemma B.2 of [9]. \(\square \)

4 Preliminary Results on Binary Recurrence Sequences

The next lemma contains several known results which are very useful for the estimates needed in the paper.

Lemma 4.1

Let \(\{u_n\}_{n \ge 0}\) be a non-degenerate binary recurrence sequence given by (1.3) and let Y defined by (1.4). Then the following hold:

  1. (i)

    \(\max \{h(\alpha ),h(\beta ), h(\alpha /\beta ), h(c), h(d), h(c/d) \} < 8\log (Y+2).\)

  2. (ii)

    If \(n>c_3:=16(Y+2)\log (Y+2)\) then \(u_n \ne 0\).

  3. (iii)

    If \(n>c_3\) then \(|u_n|>|\alpha |^{n-c_{10}\log {n}}\), where \(c_{10}:=4 \cdot 10^{11}\log (Y + 2)\).

Proof

(i) is Lemma 8, (ii) is Lemma 9 and (iii) is Lemma 11 of [3]. \(\square \)

The following lemma is also well-known (see for instance Lemma 1 of [2]) and it provides a lower bound for the p-adic valuation of factorials.

Lemma 4.2

Let p be a prime number and let m be a positive integer. If \(m \ge p\), then \(\nu _p(m!)>\frac{m}{2p}\).

The following lemma is an elementary result due to Pethő and de Weger [7]. It will be used in the proof of Theorem 2.2. For a proof of Lemma 4.3 we refer to Appendix B of [9].

Lemma 4.3

Let \(u,v \ge 0, h \ge 1\) and \(x \in {\mathbb {R}}\) be the largest solution of \(x=u+v(\log {x})^h\). Then

$$\begin{aligned} x<\max \left\{ 2^h(u^{1/h}+v^{1/h}\log (h^hv))^h, 2^h(u^{1/h}+2e^2)^h\right\} . \end{aligned}$$

In the proof of Theorem 2.1 we need an upper bound for the quantity of the form \(\nu _p(u_n-t)\), where \(t\in {\mathbb {Z}}\).

Lemma 4.4

Let \(\{u_n\}_{n \ge 0}\) be a non-degenerate sequence given by (1.3) with \(\Delta >0\) and \(w=\pm 1\). Further, let Y defined by (1.4). If \(n>c_3\) then for prime p and integer t with \(u_n \ne t\) we have

$$\begin{aligned} \nu _p(u_n-t) <\left\{ \begin{array}{llll} c_4p^2\log {n}, &{}{} \text{ if }~ t=0; \\ c_4p^2\log {n}\log (4|t|), &{}{} \text{ if }~t\ne 0, \end{array} \right. \end{aligned}$$
(4.1)

where

$$\begin{aligned} c_4=c_4(Y):=5.6 \cdot 10^{17}\log ^2(Y+2). \end{aligned}$$
(4.2)

Proof

We have the representation

$$\begin{aligned} u_n=c\alpha ^n+d\beta ^n, \end{aligned}$$
(4.3)

where

$$\begin{aligned} c=\frac{u_1-u_0\beta }{\alpha -\beta } \quad \text {and} \quad d=\frac{u_0\alpha -u_1}{\alpha -\beta } \end{aligned}$$
(4.4)

with \(cd\alpha \beta \ne 0\) and \(\alpha /\beta \) is not a root of unity. Let \({\mathbb {L}}={{\mathbb {Q}}}({\alpha })\). Let p be an arbitrary but fixed prime and denote by \(\pi \) a prime ideal dividing p in \({\mathbb {L}}\). Write \(e_{\pi }\) and \(f_{\pi }\) for the ramification index and for the residue class degree of \(\pi \), respectively. Since \(\alpha \beta =\pm 1\), it is clear that both of \(\alpha \) and \(\beta \) are units in \({\mathbb {L}}={{\mathbb {Q}}}({\alpha })\), and therefore \(\nu _{\pi }(\alpha )=\nu _{\pi }(\beta )=0\).

Suppose first that \(t=0\).

Since \(\nu _{\pi }(\alpha )=0\), we have by (4.3), (3.1), \(e_{\pi } \ge 1\) and the additive property of the function \(\nu _{\pi }\), that

$$\begin{aligned} \nu _p(u_n)=\nu _p(u_n-t)=\frac{1}{e_{\pi }}\nu _{\pi }\left( c\alpha ^n+d\beta ^n\right) \le \nu _{\pi }(c)+\nu _{\pi }(\Lambda ), \end{aligned}$$
(4.5)

where

$$\begin{aligned} \Lambda =\left( \frac{-d}{c}\right) \left( \frac{\beta }{\alpha } \right) ^n-1. \end{aligned}$$
(4.6)

Let us bound the quantities of the right hand side of (4.5). Denote by \({\mathcal {N}}({\mathcal {I}})\) the norm of the ideal \({\mathcal {I}}\). By (4.4), we clearly have

$$\begin{aligned} \nu _{\pi }(c) \le \nu _{\pi }(u_1-u_0\beta ), \end{aligned}$$

and therefore

$$\begin{aligned} p^{\nu _{\pi }(c)}\le & {} {{\mathcal {N}}(\pi )}^{\nu _{\pi }(c)} \le {{\mathcal {N}}(\pi )}^{\nu _{\pi }\left( u_1-u_0\beta \right) } \le \left| N_{{{\mathbb {L}}}/{{\mathbb {Q}}}}\left( u_1-u_0\beta \right) \right| \le Y^3+2Y^2\\< & {} (Y+2)^3. \end{aligned}$$

So,

$$\begin{aligned} \nu _{\pi }(c) < \frac{3\log (Y+2)}{\log {p}}. \end{aligned}$$
(4.7)

We next bound \(\nu _{\pi }(\Lambda )\) from above. If \(\Lambda =0\) then \(u_n=0\) also holds, which by our assumption \(n>c_3\) and (ii) of Lemma 4.1 leads to a contradiction. Thus, we may suppose that \(\Lambda \ne 0\). We apply Lemma 3.1 to bound \(\nu _{\pi }(\Lambda )\) on choosing

$$\begin{aligned} l=2, \eta _1= \frac{-d}{c}, \eta _2=\frac{\beta }{\alpha }, d_1=1, d_2=n, d_{{\mathbb {L}}} \le 2, f_{\pi } \le 2, e_{\pi } \le 2, D=n. \end{aligned}$$

By (i) of Lemma 4.1, we can take

$$\begin{aligned} H_1=H_2=\max \{\log {p},8\log (Y+2)\}. \end{aligned}$$

Applying Lemma 3.1, we get

$$\begin{aligned} \nu _{\pi }(\Lambda ) \le 19 \cdot (20\sqrt{3}\cdot 2)^6 \cdot 2 \log {(4e^5)}\frac{p^2}{(\log {p})^2}(\max \{\log {p},8\log (Y+2)\})^2\log {n}. \end{aligned}$$
(4.8)

If \(\max \{\log {p},8\log (Y+2)\}=\log {p}\) we obtain by (4.5), (4.7), (4.8), the fact that \(p \ge 2, Y \ge 1, n>c_3\) and some routine calculations that

$$\begin{aligned} \nu _p(u_n)=\nu _p(u_n-t)<2.5 \cdot 10^{13} \log (Y+2) p^2 \log {n}, \end{aligned}$$

while if \(\max \{\log {p},8\log (Y+2)\}=8\log (Y+2)\) we get

$$\begin{aligned} \nu _p(u_n)=\nu _p(u_n-t)<3.72 \cdot 10^{15} \log ^2{(Y+2)} p^2 \log {n}, \end{aligned}$$

leading to a sharper upper bound than stated in the case \(t=0\).

Assume next that \(t \ne 0\). By \(\beta =w\alpha ^{-1}=\pm \alpha ^{-1}\) and (4.3), an easy calculation gives

$$\begin{aligned} u_n-t=c\alpha ^n+d\beta ^n=c\alpha ^n(\alpha ^{-n}z_1-1)(\alpha ^{-n}z_2-1), \end{aligned}$$
(4.9)

where

$$\begin{aligned} z_{1,2}=\frac{t \pm \sqrt{t^2-4 w^n cd}}{2c}. \end{aligned}$$
(4.10)

Recall that \({{\mathbb {L}}}={\mathbb {Q}}(\alpha )\) and fix \(w \in \{-1,1\}\) as well as the parity of n. Define the number field \({\mathbb {K}}\) by

$$\begin{aligned} {\mathbb {K}}:= {\left\{ \begin{array}{ll} {\mathbb {L}}(\sqrt{t^2+4cd}), \ \text {if} \ w^n=-1; \\ {\mathbb {L}}(\sqrt{t^2-4cd}), \ \text {if} \ w^n=1. \end{array}\right. } \end{aligned}$$
(4.11)

It is clear that in both cases \(d_{{\mathbb {K}}}=[{\mathbb {K}}:{\mathbb {Q}}] \le 4\). Let p be a prime and let \(\mathfrak {p}\) be a prime ideal in \({\mathbb {K}}\) dividing p. Write \(e_{\mathfrak {p}}\) and \(f_{\mathfrak {p}}\) for the ramification index and for the residue class degree of \(\mathfrak {p}\), respectively. Using (3.1), Eq. (4.9) gives

$$\begin{aligned} \nu _p(u_n-t)=\frac{1}{e_\mathfrak {p}} \left( \nu _{\mathfrak {p}} \left( c\alpha ^n (\alpha ^{-n}z_1-1)(\alpha ^{-n}z_2-1) \right) \right) . \end{aligned}$$
(4.12)

Since \(\alpha \) is a unit also in \({\mathbb {K}}\) and \(e_{\mathfrak {p}} \ge 1\), by combining (4.12) with the additivity of the function \(\nu _{\mathfrak {p}}\) we get

$$\begin{aligned} \nu _p(u_n-t) \le \nu _{\mathfrak {p}}(c)+\nu _{\mathfrak {p}}(\alpha ^{-n}z_1-1)+\nu _{\mathfrak {p}}(\alpha ^{-n}z_2-1). \end{aligned}$$
(4.13)

Putting \(\Lambda _1:=\alpha ^{-n}z_1-1\) and \(\Lambda _2:=\alpha ^{-n}z_2-1\) inequality (4.13) can be rewritten as

$$\begin{aligned} \nu _p(u_n-t) \le \nu _{\mathfrak {p}}(c)+\nu _{\mathfrak {p}}(\Lambda _1)+\nu _{\mathfrak {p}}(\Lambda _2). \end{aligned}$$
(4.14)

Since \([{\mathbb {K}}:{\mathbb {L}}] \le 2\) and \(\nu _{\mathfrak {p}}(c) \le \nu _{\mathfrak {p}}(u_1-u_0\beta )\) we have

$$\begin{aligned} p^{\nu _{\mathfrak {p}}(c)}\le & {} {{\mathcal {N}}(\mathfrak {p})}^{\nu _{\mathfrak {p}}(c)} \le {{\mathcal {N}}(\mathfrak {p})}^{\nu _{\mathfrak {p}}(u_1-u_0\beta )} \le \Big (\left| N_{{{\mathbb {L}}}/{{\mathbb {Q}}}}(u_1-u_0\beta ) \right| \Big )^2 \le (Y^3+2Y^2)^2 \\< & {} (Y+2)^6, \end{aligned}$$

so

$$\begin{aligned} \nu _{\mathfrak {p}}(c) < \frac{6\log (Y+2)}{\log {p}}. \end{aligned}$$
(4.15)

We next bound \(\nu _{\mathfrak {p}}(\Lambda _i)\) for \(i=1,2\). It is clear that \(\Lambda _i=0 \ (i=1,2)\) holds if and only if \(\alpha ^n=z_i \ (i=1,2)\), which by (4.9) is equivalent with \(u_n=t\). However, this is excluded. Therefore \(\Lambda _i \ne 0\) for \(i=1,2\). Note, that if \(d_{{\mathbb {K}}}=4\), the number field \({\mathbb {K}}\) is a biquadratic number field. It is well known that in this case \(f_{\mathfrak {p}} \le 2\). Hence, it is clear that for \(\mathfrak {p} \in {\mathbb {K}}\) we are in one of the following cases

$$\begin{aligned} (f_{\mathfrak {p}}=1 \ \text {and} \ e_{\mathfrak {p}} \le 4) \quad \text {or} \quad (f_{\mathfrak {p}}=2 \ \text {and} \ e_{\mathfrak {p}} \le 2). \end{aligned}$$
(4.16)

In order to bound \(\nu _{\mathfrak {p}}(\Lambda _i)\) for \(i=1,2\) from above we use twice Lemma 3.1 with the parameters

$$\begin{aligned} l=2, d_{{\mathbb {K}}} \le 4, \eta _1=\alpha , \eta _2=z_1, d_1=-n, d_2=1, D=n \end{aligned}$$

to bound \(\nu _{\mathfrak {p}}(\Lambda _1)\) and with

$$\begin{aligned} l=2, d_{{\mathbb {K}}} \le 4, \eta _1=\alpha , \eta _2=z_2, d_1=-n, d_2=1, D=n \end{aligned}$$

to bound \(\nu _{\mathfrak {p}}(\Lambda _2)\). By (i) of Lemma 4.1, we have \(h(\alpha )<8\log (Y+2)\) and therefore we may choose in both cases

$$\begin{aligned} H_1=\max \{\log {p},8\log (Y+2)\}. \end{aligned}$$
(4.17)

Further, by combining (4.10) and (i) of Lemma 4.1 with some well-known properties of the absolute logarithmic height function h(.), we may write for \(i=1,2\) that

$$\begin{aligned} h(z_i) \le h\left( (2c)^{-1}\right) +h\left( t \pm \sqrt{t^2-4 w^n cd}\right) \le \log (4|t|)+8\log (Y+2)+h(\gamma ), \end{aligned}$$
(4.18)

where \(\gamma =\sqrt{t^2-4 w^n cd}\). Since

$$\begin{aligned} cd=\frac{\pm u_0^2+u_0u_1r-u_1^2}{\Delta } \end{aligned}$$

we obtain

$$\begin{aligned} \gamma =\sqrt{t^2-4 w^n cd} =\sqrt{\frac{\Delta t^2-4 w^n(\pm u_0^2+u_0u_1r-u_1^2)}{\Delta }}. \end{aligned}$$

Thus, a straightforward calculation leads to

$$\begin{aligned} h(\gamma ) \le \frac{1}{2}\log \Big (|\Delta |t^2+4\Big (u_0^2+|u_0||u_1||r|+u_1^2 \Big )\Big ). \end{aligned}$$
(4.19)

Since \(\Delta >0\), we have \(|\alpha |>|\beta |\), which together with \(w=\pm 1=\alpha \beta \) implies that \(|\beta |<1\). Further, since \(\alpha =r-\beta \), we have \(|\alpha | \le |r|+|\beta |<Y+1\), which together with \(\Delta =(\alpha -\beta )^2\) leads to

$$\begin{aligned} |\Delta |<(Y+2)^2. \end{aligned}$$
(4.20)

Now, the combination of (4.19), (1.4) and (4.20) gives

$$\begin{aligned} h(\gamma )<\frac{1}{2}\log (Y+2)+\frac{1}{2}\log \Big ((Y+2)t^2+4Y^2\Big ), \end{aligned}$$

which since \(Y<Y+2,Y \ge 1,|t| \ge 1\) implies that

$$\begin{aligned} h(\gamma )<\frac{3}{2}\log (Y+2)+\frac{1}{2}\log (4t^2)+\frac{1}{2}\log \left( 1+\frac{1}{12}\right) . \end{aligned}$$
(4.21)

Since

$$\begin{aligned} \frac{\frac{1}{2}\log (4t^2)}{\log (4|t|)}<1, \end{aligned}$$

we get by (4.18), (4.21), \(Y \ge 1\) and \(|t| \ge 1\) that

$$\begin{aligned} \max \{h(z_1),h(z_2)\}<8.75\log (4|t|)\log (Y+2). \end{aligned}$$
(4.22)

Thus, (4.22) shows that we may choose in both cases

$$\begin{aligned} H_2=\max \{\log {p},8.75\log (4|t|)\log (Y+2)\}. \end{aligned}$$
(4.23)

By (4.16), we may write

$$\begin{aligned} e_{\mathfrak {p}}\frac{p^{f_{\mathfrak {p}}}}{(f_{\mathfrak {p}}\log {p})^2} \le \max \left\{ \frac{4p}{\log ^2 p},\frac{p^2/2}{\log ^2 p}\right\} \le \frac{2p^2}{\log ^2p}. \end{aligned}$$
(4.24)

Applying Lemma 3.1 we get by (4.14), (4.15) and (4.24) that

$$\begin{aligned}{} & {} \nu _p(u_n-t) \le \frac{6\log (Y+2)}{\log {p}} + 2 \cdot 19(20\sqrt{3}\cdot 4)^6 \log {(8e^5)} \cdot \frac{2p^2}{\log ^2 p} \\{} & {} \times \max \{\log {p},8\log (Y+2)\} \max \{\log {p},8.75\log (Y+2)\log (4|t|)\} \log {n}, \end{aligned}$$

which together with \(p \ge 2, Y \ge 1, |t| \ge 1\) and \(n > c_3 \ge 48\log {3}\) leads to the desired upper bound. The proof of Lemma 4.4 is complete. \(\square \)

The next lemma deals with sums of factorials in binary recurrence sequences. This was originally proved by Grossman and Luca (see Theorem 1 of [2]). For our purposes, we need a totally explicit version of Theorem 1 of [2] in the case where \(\Delta >0\) and \(w=\pm 1\).

Lemma 4.5

Let \(\{u_n\}_{n \ge 0}\) be the non-degenerate binary recurrence sequence given by (1.3) with \(\Delta >0\) and \(w=\pm 1\). Further, let \(k \ge 1\) and \(A \ge 1\) be fixed positive integers. Consider the equation

$$\begin{aligned} u_n=a_1m_1!+\cdots +a_km_k!\qquad {\text {where}}\qquad |a_i| \le A \ (1 \le i \le k) \end{aligned}$$
(4.25)

in integer unknowns \((n,m_1,\ldots ,m_k)\) with

$$\begin{aligned} m_1>m_2>\cdots >m_k \ge 1. \end{aligned}$$
(4.26)

Then we have \(n \le \min (c_3,n_0)\), where \(n_0:=n_0(k)\) is the largest positive integer solution of the inequality

$$\begin{aligned} n<2.08 \cdot \left( \log (4A)+21.6c_4\log ^2{n}\right) ^k. \end{aligned}$$

Proof

If \(n\le c_3\), then the statement is automatic. So throughout the proof we shall assume that \(n>c_3\). Consider the Eq. (4.25) satisfying assumption (4.26). We may assume that there is no vanishing subsum on the right hand side of (4.25); that is, that we have

$$\begin{aligned} \sum _{i \in I \subset \{1,2,\ldots ,k\}}{a_im_i!} \ne 0 \end{aligned}$$
(4.27)

for each non-empty subset \(I \subset \{1,2,\ldots ,k\}\). Note, that (4.27) can be assumed without loss of generality, since otherwise we obtain an equation similar to (4.25) with fewer terms.

For \(j=1,\ldots ,k\) put

$$\begin{aligned} N_j=\sum _{i=1}^j{a_{k+1-i}m_{k+1-i}!} \end{aligned}$$
(4.28)

We show by induction that

$$\begin{aligned} \log |4N_j| <\left( \log (4A)+21.6c_4\log ^2{n}\right) ^j. \end{aligned}$$
(4.29)

For \(j=1\) we have \(|4N_j|=|4a_km_k!|\). Further, since \(n>c_3\), by applying Lemma 4.4 with \(t=0\) and \(p=2\), we obtain

$$\begin{aligned} \nu _2(u_n) < 4c_4\log {n}. \end{aligned}$$
(4.30)

Further, by (4.26) it is clear that

$$\begin{aligned} \nu _2(u_n)=\nu _2(a_1m_1!+\cdots +a_km_k!) \ge \nu _2(m_k!). \end{aligned}$$

If \(m_k \ge 4\cdot (4c_4\log {n})\) then Lemma 4.2 yields \(\nu _2(m_k!) > 4c_4\log {n}\), contradicting (4.30). Thus, \(m_k < 4\cdot (4c_4\log {n})=16c_4\log {n}\), whence

$$\begin{aligned} \log |4N_1|\le \log |4a_k|+m_k\log {m_k}<\log (4A)+\left( 16c_4\log {n}\right) \log (16c_4\log {n}). \end{aligned}$$
(4.31)

We may assume that \(n>16c_4\), since otherwise we obtain \(n \le 16c_4\), which is better than the stated inequality. Since for \(n>c_3 (\ge 48\log {3})\) one has \(\log {\log {n}}/\log n<0.35\) we may write by (4.31) that

$$\begin{aligned} \log |4N_1|<\log (4A)+21.6c_4\log ^2{n}. \end{aligned}$$
(4.32)

Suppose now, that (4.29) holds for some \(1 \le j < k\). By rewriting (4.25) in the form

$$\begin{aligned} u_n-N_j=a_{k-j}m_{k-j}!+\cdots +a_1m_1!, \end{aligned}$$
(4.33)

we easily see by (4.27) that the right hand side of (4.33) is nonzero and hence \(u_n \ne N_j\). Further, by (4.27) \(N_j \ne 0\) also holds. Therefore, we may apply Lemma 4.4 with \(p=2\) and \(t=N_j\). We obtain that

$$\begin{aligned} \nu _2(u_n-N_j) < 4c_4\log (|4N_j|)\log n. \end{aligned}$$
(4.34)

Further, by (4.26) it is clear that

$$\begin{aligned} \nu _2(u_n-N_j)=\nu _2(a_1m_1!+\cdots +a_{k-j}m_{k-j}!) \ge \nu _2(m_{k-j}!). \end{aligned}$$

If \(m_{k-j} \ge 4 \cdot 4c_4\log (|4N_j|)\log n\) then Lemma 4.2 yields

$$\begin{aligned} \nu _2(m_{k-j}!) > 4c_4\log (|4N_j|)\log {n}, \end{aligned}$$

contradicting (4.34). Thus, \(m_{k-j} < 16c_4\log (|4N_j|)\log {n}\), whence

$$\begin{aligned} \log |4a_{k-j}m_{k-j}|<\log (4A)+\left( 16c_4\log (|4N_j|)\log {n}\right) \log (16c_4\log (|4N_j|)\log {n}). \end{aligned}$$
(4.35)

We may assume that \(n > 16c_4\log (|4N_j|)\). Indeed, if \(n \le 16c_4\log (|4N_j|)\), we then get by (4.29) that

$$\begin{aligned} n<16c_4\left( \log (4A)+21.6c_4\log ^2{n}\right) ^j. \end{aligned}$$

Further, since \(j \le k-1\) the above inequality implies that

$$\begin{aligned} n<16c_4\left( \log (4A)+21.6c_4\log ^2{n}\right) ^{k-1}, \end{aligned}$$

which is better than the stated bound for n. Since for \(n>c_3 (\ge 48\log {3})\) one has \(\log {\log {n}}/\log n<0.35\) we may write by \(n > 16c_4\log (|4N_j|)\) and (4.35) that

$$\begin{aligned} \log |4a_{k-j}m_{k-j}|<\log (4A)+21.6c_4\log (|4N_j|)\log ^2{n}. \end{aligned}$$
(4.36)

It is clear that

$$\begin{aligned} 4N_{j+1}=4N_j+4a_{k-j}m_{k-j}!, \end{aligned}$$

and hence

$$\begin{aligned} |4N_{j+1}| \le |4N_j|+|4a_{k-j}m_{k-j}!|. \end{aligned}$$

Thus,

$$\begin{aligned} |4N_{j+1}| < |4N_j|+\exp \{\log (4A)+21.6c_4\log (|4N_j|)\log ^2{n}\}, \end{aligned}$$

which is equivalent to

$$\begin{aligned} |4N_{j+1}| < |4N_j|+4A|4N_j|^{21.6c_4\log ^2{n}}. \end{aligned}$$
(4.37)

Now, (4.37) implies that

$$\begin{aligned} |4N_{j+1}| \le |4N_j|+4A|4N_j|^{21.6c_4\log ^2{n}}, \end{aligned}$$

which leads to

$$\begin{aligned} \log |4N_{j+1}|< & {} \log (4A)+21.6c_4\log ^2{n}\log |4N_j|\nonumber \\+ & {} \log \left( 1+\frac{1}{4A|4N_j|^{21.6c_4(\log ^2{n})-1}}\right) . \end{aligned}$$
(4.38)

Since \(A \ge 1, |N_j| \ge 1\) and \(21.6c_4(\log ^2{n})-1 \ge 1\) one has

$$\begin{aligned} \log \left( 1+\frac{1}{4A|4N_j|^{21.6c_4(\log ^2{n})-1}}\right) <0.1, \end{aligned}$$

which by (4.38) yields

$$\begin{aligned} \log |4N_{j+1}|<\log (4A)+21.6c_4\log ^2{n}\log |4N_j|+0.1. \end{aligned}$$
(4.39)

The combination of (4.29) and (4.39) gives

$$\begin{aligned} \log |4N_{j+1}|<\log (4A)+21.6c_4\log ^2{n}(\log (4A)+21.6c_4\log ^2{n})^j+0.1. \end{aligned}$$
(4.40)

Finally, since

$$\begin{aligned}{} & {} \log (4A)+21.6c_4\log ^2{n}(\log (4A)+21.6c_4\log ^2{n})^j\\{} & {} \quad <(\log (4A)+21.6c_4\log ^2{n})^{j+1}-1, \end{aligned}$$

we obtain by (4.40) that

$$\begin{aligned} \log |4N_{j+1}|<\left( \log (4A)+21.6c_4\log ^2{n}\right) ^{j+1}, \end{aligned}$$
(4.41)

finishing the induction.

Recall that by assumption \(n>c_3\), which guarantees that \(u_n \ne 0\). The above inductive argument together with (iii) of Lemma 4.1 shows that

$$\begin{aligned} \log {4}+(n-c_{10}\log {n})\log |\alpha |< & {} \log (4|u_n|)=\log |4N_k|\\< & {} \left( \log (4A)+21.6c_4\log ^2{n}\right) ^k, \end{aligned}$$

whence

$$\begin{aligned} n<\left( \log (4A)+21.6c_4\log ^2{n}\right) ^k\left( \frac{1}{\log {|\alpha |}}+\frac{c_{10}\log {n}}{\left( \log (4A)+21.6c_4\log ^2{n}\right) ^k}\right) \end{aligned}$$

which together with \(n>c_3, \log (4A)>0, |\alpha | \ge (1+\sqrt{5})/2, k \ge 1\) and the definitions of \(c_{10}\) and \(c_4\) implies

$$\begin{aligned} n<2.08 \cdot \left( \log (4A)+21.6c_4\log ^2{n}\right) ^k. \end{aligned}$$
(4.42)

The lemma is proved. \(\square \)

5 Proof of Theorem 2.1

Proof of Theorem 2.1

Suppose that

$$\begin{aligned} n>c_6=\max \{c_3,n_1\}. \end{aligned}$$
(5.1)

Since \(n_1 \ge n_0\), Lemma 4.5 implies that

$$\begin{aligned} u_n-(a_1m_1!+\cdots +a_km_k!) \ne 0. \end{aligned}$$

Thus, we may write

$$\begin{aligned} u_n=a_1m_1!+\cdots +a_km_k!+s, \end{aligned}$$
(5.2)

where \(s \ne 0\) is some integer, \(|a_i| \le A\) and

$$\begin{aligned} m_1>m_2>\ldots >m_k \ge 1. \end{aligned}$$
(5.3)

We let \(P:=P(s)\). By employing an inductive argument similar to the one applied in Lemma 4.5, we derive an explicit upper bound for n in terms of PAk and Y in equation (5.2), leading to an explicit lower bound for P and therefore also for \(P(u_n-(a_1m_1!+\cdots +a_km_k!))\).

We may assume without loss of generality that there is no vanishing subsum on the right hand side of (5.2), that is that

$$\begin{aligned} \sum _{i \in I \subset \{1,2,\ldots ,k\}}{a_im_i!}+\delta s \ne 0 \end{aligned}$$
(5.4)

holds for each non-empty subset \(I \subset \{1,2,\ldots ,k\}\) and each \(\delta \in \{0,1\}\). Indeed, if there is an index set \(I \subset \{1,2,\ldots ,k\}\) and \(\delta \in \{0,1\}\) such that

$$\begin{aligned} \sum _{i \in I \subset \{1,2,\ldots ,k\}}{a_im_i!}+\delta s = 0, \end{aligned}$$

then (5.2) implies that

$$\begin{aligned} {\left\{ \begin{array}{ll} u_n=\displaystyle \sum _{i \in \{1,2,\ldots ,k\} \setminus I}{a_im_i!}+s, &{} \text{ if } \delta =0, \\ u_n=\displaystyle \sum _{i \in \{1,2,\ldots ,k\} \setminus I}{a_im_i!}, &{} \text{ if } \delta =1. \end{array}\right. } \end{aligned}$$
(5.5)

Now, (5.5) shows that for \(\delta =1\) we obtain an equation similar to (4.25) which for \(n>n_0\) cannot happen, while for \(\delta =0\) we get an equation similar to (5.2) with fewer terms.

If \(|s|=m_i!\) for some \(i=1,\ldots ,k\), then (5.2) leads to an equation of the form

$$\begin{aligned} u_n=a_1m_1!+\cdots +a_{i-1}m_{i-1}!+(a_i \pm 1)m_i!+a_{i+1}m_{i+1}+\cdots +a_km_k!, \end{aligned}$$

which by Lemma 4.5 gives \(n \le n_1\), which is a contradiction in view of (5.1).

Put \(m_{k+1}:=0\) and let \(m_0\) be such that \(\max \{|s|,m_1!\}<m_0!\). By (5.1), there exists an index \(0 \le i_0 \le k\) such that

$$\begin{aligned} m_{k+1-i_0}!<|s|<m_{k+1-i_0-1}!, \end{aligned}$$
(5.6)

and for \(i=1,\ldots ,k+1\) we put

$$\begin{aligned} t_i= {\left\{ \begin{array}{ll} a_{k+1-i}m_{k+1-i}!, &{} \text{ if } i \le i_0, \\ s, &{} \text{ if } i=i_0+1, \\ a_{(k+1)-(i-1)}m_{(k+1)-(i-1)}!, &{} \text{ if } i \ge i_0+2. \end{array}\right. } \end{aligned}$$
(5.7)

For \(j=1,\ldots ,k+1\), we set

$$\begin{aligned} N_j:=\sum _{i=1}^{j}{t_i}. \end{aligned}$$
(5.8)

We show by induction on j that for \(1 \le j \le k+1\)

$$\begin{aligned} \log |4N_j|<\left( \log (4A)+2.7c_4P^3\log ^2{n}\right) ^j. \end{aligned}$$
(5.9)

For \(j=1\) we easily see that

$$\begin{aligned} N_1=t_1= {\left\{ \begin{array}{ll} s, &{} \text{ if } |s|<m_k! ,\\ a_km_k!, &{} \text{ if } |s|>m_k!. \end{array}\right. } \end{aligned}$$

Case 1. \(|s|<m_k!\).

In this case \(N_1=s\). Recall that \(P=\max \{p: p\mid s\}\). By (5.1), we have that \(u_n \ne 0\) and therefore by applying Lemma 4.4 with \(t=0\) and with each prime factor \(p \mid s\), we obtain \(\nu _p(u_n)<c_4p^2\log {n}\), which yields

$$\begin{aligned} \nu _p(u_n)<c_4P^2\log {n} \qquad (p \mid s). \end{aligned}$$
(5.10)

On using (5.3) for every prime p we infer that

$$\begin{aligned} \nu _p(a_1m_1!+\cdots +a_km_k!) \ge \nu _p(m_k!). \end{aligned}$$
(5.11)

If \(m_k \ge 2P(c_4P^2\log {n})=2c_4P^3\log {n}\), then Lemma 4.2 and \(p \le P\) show that

$$\begin{aligned} \nu _p(m_k!)>\frac{m_k}{2p} \ge c_4P^2\log {n} \end{aligned}$$

holds for every \(p \mid s\), which by (5.2), (5.10) and (5.11) forces

$$\begin{aligned} \nu _p(u_n)=\nu _p(s) \end{aligned}$$
(5.12)

to hold for every \(p \mid s\). Thus, (5.12) and (5.10) imply

$$\begin{aligned} \log (|s|)=\sum _{p \mid s}{\nu _p(s)\log {p}}=\sum _{p \mid s}{\nu _p(u_n)\log {p}}<c_4P^2(\log {n})\pi (P)\log {P}. \end{aligned}$$

Since \(\pi (P)<{2P}/{\log {P}}\) (see Corollary 1 in [8]), the above inequality leads to

$$\begin{aligned} \log (4|N_1|)=\log (4|s|)<\log {4}+2c_4P^3\log {n}. \end{aligned}$$
(5.13)

Suppose now that \(m_k<2c_4P^3\log {n}\). Then since \(m_k! \le m_k^{m_k}\), we may write

$$\begin{aligned} \log (|4m_k!|)<\log {4}+(2c_4P^3\log {n})\log (2c_4P^3\log {n}). \end{aligned}$$
(5.14)

If \(n<2c_4P^3\), then \(P>n^{1/3}(2c_4)^{-1/3}\), which is a sharper lower bound for P than stated. Therefore, we may assume that \(n \ge 2c_4P^3\) which combined with (5.14) and with \(\log {\log {n}}/\log {n}<0.35\) which holds for \(n>n_1\), we get

$$\begin{aligned} \log (|4m_k!|)<\log {4}+2.7c_4P^3\log ^2{n}. \end{aligned}$$
(5.15)

Since \(\log (|4N_1|)= \log (|4s|)\), we obtain from \(|s|<m_k!\) and (5.15) that

$$\begin{aligned} \log (|4N_1|)<\log {4}+2.7c_4P^3\log ^2{n}. \end{aligned}$$
(5.16)

Case 2. \(|s|>m_k!\).

In this case, \(N_1=a_km_k!\). If \(m_k \ge 2c_4P^3\log {n}\) then using the same argument as in Case 1, we get that \(\log (4|s|)<\log {4}+2c_4P^3\log {n}\), which together with \(m_k!<|s|\) and \(|a_k| \le A\) implies that

$$\begin{aligned} \log (|4N_1|)=\log (|4a_km_k!|)<\log (|4a_ks|)< \log (4A)+2c_4P^3\log {n}. \end{aligned}$$
(5.17)

Assume now that \(m_k<2c_4P^3\log {n}\). Then by the argument applied in the corresponding part of Case 1, we obtain

$$\begin{aligned} \log (|4N_1|)=\log (|4a_km_k!|)<\log (4A)+2.7c_4P^3\log ^2{n}. \end{aligned}$$
(5.18)

Finally, (5.13), (5.16), (5.17) and (5.18) show that in fact the bound occurring in (5.18) is appropriate for all cases proving the assertion for \(j=1\).

Assume now that (5.9) holds for some \(1 \le j<k+1\). Rewrite (5.2) as

$$\begin{aligned} u_n-N_j=a_1m_1!+\cdots +a_{\ell }m_{\ell }!+\delta s, \end{aligned}$$
(5.19)

where \(\delta \in \{0,1\}\) and \(\ell :=\ell (\delta ,j,k)=k+1-j-\delta \). It is clear that \(N_{j+1}=N_j+t_{j+1}\), where

$$\begin{aligned} t_{j+1}= {\left\{ \begin{array}{ll} a_{\ell }m_{\ell }!, &{} \text{ if } (\delta =0) \ \text {or} \ (\delta =1 \ \text {and} \ |s|>m_{\ell }!), \\ s, &{} \text{ if } \delta =1 \ \text {and} \ |s|<m_{\ell }!. \end{array}\right. } \end{aligned}$$
(5.20)

Further, \(N_j \ne 0\) and \(u_n-N_j \ne 0\) hold in view of (5.4). Thus, we apply Lemma 4.4 with \(t=N_j\) to obtain \(\nu _p(u_n-N_j)<c_4p^2\log (|4N_j|)\log {n}\), for every prime p. If \(p \mid s\) then \(p \le P\), so

$$\begin{aligned} \nu _p(u_n-N_j)<c_4P^2\log (|4N_j|)\log {n}. \end{aligned}$$
(5.21)

Using (5.3), we get that

$$\begin{aligned} \nu _p(a_1m_1!+\cdots +a_{\ell }m_{\ell }!) \ge \nu _p(m_{\ell }!). \end{aligned}$$
(5.22)

We wish to estimate \(\log {|4t_{j+1}|}\). To do so, we split the proof into three cases according to the value of \(t_{j+1}\) (see 5.20).

Assume first that \(\delta =1 \ \text {and} \ |s|<m_{\ell }!\).

Then \(t_{j+1}=s\). If \(m_{\ell } \ge 2P(c_4P^2\log (|4N_j|)\log {n})=2c_4P^3\log (|4N_j|)\log {n}\) then Lemma 4.2 and \(p \le P\) shows that

$$\begin{aligned} \nu _p(m_{\ell }!)>\frac{m_{\ell }}{2p} \ge c_4P^2\log (|4N_j|)\log {n} \qquad (p \mid s), \end{aligned}$$

which by (5.19), (5.21) and (5.22) forces

$$\begin{aligned} \nu _p(u_n-N_j)=\nu _p(s) \qquad (p \mid s). \end{aligned}$$
(5.23)

Thus, (5.21) and \(p \le P\) imply

$$\begin{aligned} \log (|s|)= & {} \sum _{p \mid s}{\nu _p(s)\log {p}}=\sum _{p \mid s}{\nu _p(u_n-N_j)\log {p}}\\< & {} c_4P^2\log (|4N_j|)(\log {n})\pi (P)\log {P}. \end{aligned}$$

Since \(\pi (P)<2P/\log P\), the above inequality leads to

$$\begin{aligned} \log (|4t_{j+1}|)=\log (4|s|)<\log {4}+2c_4P^3\log (|4N_j|)\log {n}. \end{aligned}$$
(5.24)

Suppose now that \(m_{\ell } < 2c_4P^3\log (|4N_j|)\log {n}\). Then, by the same argument as in the corresponding part of the case \(j=1\), we obtain

$$\begin{aligned} \log (4m_{\ell }!)<\log {4}+(2c_4P^3\log (|4N_j|)\log {n})\log (2c_4P^3\log (|4N_j|)\log {n}). \end{aligned}$$
(5.25)

If \(n<2c_4P^3\log (|4N_j|)\) then (5.9); i.e., the induction hypothesis and \(j \le k\) yield

$$\begin{aligned} n<2c_4P^3(\log (4A)+2.7c_4P^3\log ^2{n})^k<(\log (4A)+2.7c_4P^3\log ^2{n})^{k+1}, \end{aligned}$$

which leads to a sharper lower bound for P than stated. Therefore, we may assume that \(n \ge 2c_4P^3\log (|4N_j|)\), which by (5.25), \(|s|<m_{\ell }!\) and \(\log (\log {n})/\log {n}<0.35\) gives

$$\begin{aligned} \log (|4t_{j+1}|)=\log (4|s|)<\log (4m_{\ell }!)<\log {4}+2.7c_4P^3\log (|4N_j|)\log ^2{n}. \end{aligned}$$
(5.26)

Suppose now that \(\delta =1 \ \text {and} \ |s|>m_{\ell }!\).

In this case, we have \(t_{j+1}=a_{\ell }m_{\ell }!\). If \(m_{\ell } \ge 2c_4P^3\log (|4N_j|)\log {n}\), then by the same argument as in the corresponding part of the previous case, we obtain that \(\log (|4s|)\) is “small” (by “small” we mean a quantity bounded polynomially in both P and \(\log n\)), that is

$$\begin{aligned} \log (|4s|)<\log {4}+2c_4P^3\log (|4N_j|)\log {n}, \end{aligned}$$

which by \(|4a_{\ell }s|>|4a_{\ell }m_{\ell }!|\) gives

$$\begin{aligned} \log (|4t_{j+1}|)=\log (4a_{\ell }m_{\ell }!)<\log (|4a_{\ell }s|)<\log (4A)+2c_4P^3\log (|4N_j|)\log {n}. \end{aligned}$$
(5.27)

Assume now that \(m_{\ell }< 2c_4P^3\log (|4N_j|)\log {n}\). By the same argument as in the corresponding part of the previous case, we obtain that \(\log (|4a_{\ell }m_{\ell }!|)\) is “small”, that is

$$\begin{aligned} \log (|4t_{j+1}|)=\log (4a_{\ell }m_{\ell }!)<\log (4A)+2.7c_4P^3\log (|4N_j|)\log ^2{n}. \end{aligned}$$
(5.28)

Finally, suppose that \(\delta =0\). Then it is straightforward that \(t_{j+1}=a_{\ell }m_{\ell }!\). We apply Lemma 4.4 with \(t=N_j\) and with some prime \(p_1 \mid s\). We get

$$\begin{aligned} \nu _{p_1}(u_n-N_j)<c_4P^2\log (|4N_j|)\log {n}. \end{aligned}$$
(5.29)

By (5.3) and (5.19) (with \(\delta =0\)) it is clear that for \(p_1\) (actually for each prime \(p\mid s\)), we have

$$\begin{aligned} \nu _{p_1}(u_n-N_j) \ge \nu _{p_1}(m_{\ell }!). \end{aligned}$$
(5.30)

If \(m_{\ell } \ge 2c_4P^3\log (|4N_j|)\log {n}\) then Lemma 4.2 and \(p_1 \le P\) shows that

$$\begin{aligned} \nu _{p_1}(m_{\ell }!)>c_4P^2\log (|4N_j|)\log {n}, \end{aligned}$$

which is a contradiction in view of (5.29) and (5.30). Therefore, we may suppose that \(m_{\ell } < 2c_4P^3\log (|4N_j|)\log {n}\). By the same argument as in the corresponding part of the previous case, we obtain that \(\log (|4a_{\ell }m_{\ell }!|)\) is “small”, that is

$$\begin{aligned} \log (|4t_{j+1}|)=\log (4a_{\ell }m_{\ell }!)<\log (4A)+2.7c_4P^3\log (|4N_j|)\log ^2{n}. \end{aligned}$$
(5.31)

Now (5.24), (5.26), (5.27), (5.28) and (5.29) show that in fact the bound occurring in (5.29) is appropriate for all cases proving that

$$\begin{aligned} \log (|4t_{j+1}|)<\log (4A)+2.7c_4P^3\log (|4N_j|)\log ^2{n}. \end{aligned}$$
(5.32)

Since \(N_{j+1}=N_j+t_{j+1}\), we obtain by (5.32) and the triangle inequality that

$$\begin{aligned} |4N_{j+1}|<|4N_j|+\exp \{\log (4A)+2.7c_4P^3\log (|4N_j|)\log ^2{n}\}, \end{aligned}$$

whence

$$\begin{aligned} |4N_{j+1}|<|4N_j|+4A|4N_j|^{2.7c_4P^3\log ^2{n}}. \end{aligned}$$
(5.33)

Inequality (5.33) leads to

$$\begin{aligned} \log |4N_{j+1}|< & {} \log (4A)+2.7c_4P^3\log (|4N_j|)\log ^2{n} \\+ & {} \log {\left( 1+\frac{1}{4A|4N_j|^{2.7c_4P^3\log ^2{n}-1}}\right) }, \end{aligned}$$

which by \(A \ge 1, |N_j| \ge 1, P \ge 2, n>n_1\) and \(c_4 \ge 5.6 \cdot 10^{17}\log ^2{3}\) yields

$$\begin{aligned} \log |4N_{j+1}|<\log (4A)+2.7c_4P^3\log (|4N_j|)\log ^2{n}+0.1. \end{aligned}$$
(5.34)

Further, by the combination of (5.34) with the inductive hypothesis (5.9), we infer that

$$\begin{aligned} \log |4N_{j+1}|<\log (4A)+2.7c_4P^3\log ^2{n}(\log (4A)+2.7c_4P^3\log ^2{n})^j+0.1. \end{aligned}$$
(5.35)

Since for every \(u,v \in {\mathbb {R}}\) with \(u>1,v>1\) and every integer \(j \ge 1\) one has \(u+v(u+v)^j<(u+v)^{j+1}-1\), we get by (5.35)

$$\begin{aligned}{} & {} \log (4A)+2.7c_4P^3\log ^2{n}(\log (4A)+2.7c_4P^3\log ^2{n})^j+0.1\\< & {} (\log (4A)+2.7c_4P^3\log ^2{n})^{j+1}-0.9, \end{aligned}$$

whence

$$\begin{aligned} \log |4N_{j+1}|<\left( \log (4A)+2.7c_4P^3\log ^2{n}\right) ^{j+1}, \end{aligned}$$
(5.36)

finishing the induction.

Recall that \(n>c_6=\max \{n_1,c_3\}\), which guarantees that \(u_n \ne 0\). The above inductive argument together with (iii) of Lemma 4.1 shows that

$$\begin{aligned} \log {4}+(n-c_{10}\log {n})\log |\alpha |< & {} \log (4|u_n|)=\log |4N_{k+1}|\\< & {} \left( \log (4A)+2.7c_4P^3\log ^2{n}\right) ^{k+1}, \end{aligned}$$

leading to

$$\begin{aligned} n<\left( \log (4A)+2.7c_4P^3\log ^2{n}\right) ^{k+1}\left( \frac{1}{\log {|\alpha |}}+\frac{c_{10}\log {n}}{\left( \log (4A)+2.7c_4P^3\log ^2{n}\right) ^{k+1}}\right) \end{aligned}$$

which since \(n>c_3, \log (4A)>0, |\alpha | \ge (1+\sqrt{5})/2, k \ge 1\) and the definitions of \(c_{10}\) and \(c_4\) implies that

$$\begin{aligned} n<2.08 \cdot \left( \log (4A)+2.7c_4P^3\log ^2{n}\right) ^{k+1}. \end{aligned}$$
(5.37)

Finally, (5.37) and \(P \ge 2\) yield

$$\begin{aligned} n<2.08\cdot P^{3k+3}\left( \frac{\log (4A)}{8}+2.7c_4\log ^2{n}\right) ^{k+1}, \end{aligned}$$
(5.38)

which is equivalent to

$$\begin{aligned} P>\left( \frac{n}{2.08}\right) ^{\frac{1}{3k+3}}\left( \frac{\log (4A)}{8}+2.7c_4\log ^2{n}\right) ^{-1/3}. \end{aligned}$$
(5.39)

The theorem is proved. \(\square \)

Remark

For the equation

$$\begin{aligned} F_n=m_1!+m_2!+2^a3^b5^c7^d, \end{aligned}$$

where \(F_n\) is the Fibonacci sequence, we may use (5.38) (or (5.39)) with \(k=2, A=1, P=7, Y=1, c_4=5.6 \cdot 10^{17} \log ^2(Y+2)=5.6 \cdot 10^{17}\log ^2{3}\) to obtain

$$\begin{aligned} n<2 \cdot 10^{76} \quad (<10^{80}). \end{aligned}$$
(5.40)

6 Proof of Theorem 2.2

Proof

It is enough to show that assumption \(n>c_6\) implies \(n < c_8\) yielding the desired upper bound (2.5); i.e., \(n \le \max \{c_6,c_8\}=c_7\).

Suppose that \(n>c_6\) and rewrite Eq. (2.4) in the form

$$\begin{aligned} u_n-\sum _{i=1}^{k}{a_i m_i!}=bs. \end{aligned}$$
(6.1)

We investigate the quantity \(P\left( u_n-\sum _{i=1}^{k}{a_i m_i!}\right) \); i.e., the greatest prime divisor of \(u_n-\sum _{i=1}^{k}{a_i m_i!}\). On one hand, by (6.1) we have

$$\begin{aligned} P\left( u_n-\sum _{i=1}^{k}{a_i m_i!}\right) =P(bs) \le \max \{P,A\}. \end{aligned}$$
(6.2)

On the other hand, since \(n>c_6\), Theorem 2.1 gives

$$\begin{aligned} P(bs)=P\left( u_n-\sum _{i=1}^{k}{a_i m_i!}\right) >c_5(n), \end{aligned}$$
(6.3)

where \(c_5(n)\) is defined in the statement of Theorem 2.1. Now, the combination of (6.2) and (6.3) yields

$$\begin{aligned} n<2.08 \cdot (\max \{P,A\})^{3k+3}\left( \frac{\log (4A)}{8}+2.7\,c_4\,\log ^2{n} \right) ^{k+1}. \end{aligned}$$
(6.4)

By \(A \ge 1, n>c_6\) and the definition of \(c_4\) we easily see that

$$\begin{aligned} \frac{1}{8 \cdot 2.7 \cdot c_4 \log ^2{n}}+\frac{1}{\log (4A)}<0.74, \end{aligned}$$

which together with (6.4) yields

$$\begin{aligned} n<c_9 \cdot \log ^{2k+2}{n}, \end{aligned}$$
(6.5)

with

$$\begin{aligned} c_9:=2.08 \cdot (\max \{P,A\})^{3k+3} \cdot (2c_4\log (4A))^{k+1}. \end{aligned}$$

Finally, by applying Lemma 4.3 to (6.5) with the parameters

$$\begin{aligned} x=n, u=0, v=c_9, h=2k+2, \end{aligned}$$

we obtain that \(n < c_8\), where

$$\begin{aligned} c_8:=\max \left\{ 2^{2k+2} \, c_9 \, \log ^{2k+2}\left( (2k+2)^{2k+2} \, c_9\right) , (4 \textrm{e}^2)^{2k+2} \right\} . \end{aligned}$$

The theorem is proved. \(\square \)

7 Preliminary Results on Fibonacci and Lucas Numbers

The recurrence sequence \(\{F_n\}_{n\ge 0}\) defined by

$$\begin{aligned} F_0:=0, F_1:=1; F_n:=F_{n-1}+F_{n-2} \ \ (n\ge 2) \end{aligned}$$

is called the Fibonacci sequence, and the elements belonging to this sequence are called Fibonacci numbers. The recurrence sequence \(L_n\) given by

$$\begin{aligned} L_0:=2, L_1:=1; L_n:=L_{n-1}+L_{n-2} \ \ (n\ge 2) \end{aligned}$$

is called the companion sequence of the Fibonacci sequence, and the elements belonging to this sequence are called Lucas numbers. We have \(\alpha =(1+{\sqrt{5}})/2\) and \(\beta =(1-{\sqrt{5}})/2\) for the above sequences.

In this section we collect results about Fibonacci and Lucas numbers which are needed in the proof of Theorem 2.3.

Lemma 7.1

Let \(F_n\) denote the \(n^\textrm{th}\) Fibonacci number.

  1. (1)

    \(2\mid F_n \iff 3 \mid n\);

  2. (2)

    for \(k\ge 2\) we have \(2^k\mid F_n\iff 3\cdot 2^{k-2}\mid n\);

  3. (3)

    \(3^k\mid F_n\iff 4\cdot 3^{k-1}\mid n\);

  4. (4)

    \(5^k\mid F_n\iff 5^k\mid n\);

  5. (5)

    \(7^k\mid F_n\iff 8\cdot 7^{k-1}\mid n\);

  6. (6)

    \(11^k \mid F_n \iff 10\cdot 11^{k-1} \mid n\);

  7. (7)

    \(13^k \mid F_n \iff 7\cdot 13^{k-1} \mid n\);

  8. (8)

    \(17^k \mid F_n \iff 9\cdot 17^{k-1} \mid n\);

  9. (9)

    \(19^k \mid F_n \iff 18\cdot 19^{k-1} \mid n\);

  10. (10)

    \(29^k \mid F_n \iff 14\cdot 29^{k-1} \mid n\).

Proof

This is a simple consequence of the Main Theorem, Lemma 1 and Lemma 2 of [4]. \(\square \)

Lemma 7.2

Let \(L_n\) denote the \(n^\textrm{th}\) Lucas number. Then

$$\begin{aligned} \nu _2(L_n)\le 2. \end{aligned}$$

Proof

This is a simple consequence of Lemma 2 of [4]. \(\square \)

Lemma 7.3

Let N be a positive integer not of the form \(F_m\) for some positive integer m. Then for all positive integers \(n \ge 3\) one has

$$\begin{aligned} \nu _2(F_n-N)<1730 \log (6N^2)\max \{ 10, \log n \}^2. \end{aligned}$$

Proof

This is Lemma 1 of [1]. \(\square \)

Lemma 7.4

Let \(n\ge 0\) be an integer and \(m\in \{ 3,4,5,6,7,8,9,10, 12, 14, 18 \}\). Assume that

$$\begin{aligned} 30! \mid F_n-F_m. \end{aligned}$$

Then the the parity of n and m must be the same.

Proof

We have the following cases to consider:

  • if \(m=3\) then \(F_n\equiv 2 \pmod 8\) which by Lemma 7.1 implies that \(n\equiv \pm 3 \pmod {12}\);

  • if \(m=4\) then \(3 \mid F_n\) which by Lemma 7.1 implies \(4\mid n\);

  • if \(m=5\) then \(5\mid F_n\), which by Lemma 7.1 implies \(5\mid n\). If n would be even, then by \(10\mid n\) we would get \(11\mid F_n\) and since \(11\mid 30!\) this contradicts the fact \(F_m=5\), consequently n must be odd;

  • if \(m=6\) then we have \(8\mid F_n\) which by Lemma 7.1 implies \(6\mid n\);

  • if \(m=7\) then we have \(13 \mid F_n\) which by Lemma 7.1 implies \(7\mid n\) and if n would be even, then we would have \(14\mid n\) implying \(29 \mid F_n\) which together with \(F_m =13\) contradicts \(30! \mid F_n-F_m\);

  • if \(m=8\) then we have \(7\mid F_n\) which by Lemma 7.1 implies \(8\mid n\);

  • if \(m=9\) then we have \(17\mid F_n\) which by Lemma 7.1 implies \(9\mid n\) and if n would be even, then we would have \(18\mid n\) implying \(19 \mid F_n\) which together with \(F_m =34\) contradicts \(30! \mid F_n-F_m\);

  • if \(m=10\) then we have \(11 \mid F_n\) which by Lemma 7.1 implies \(10\mid n\);

  • if \(m=12\) then we have \(16 \mid F_n\) which by Lemma 7.1 implies \(12\mid n\);

  • if \(m=14\) then we have \(29 \mid F_n\) which by Lemma 7.1 implies \(14\mid n\);

  • if \(m=18\) then we have \(8 \mid F_n\) which by Lemma 7.1 implies \(6\mid n\).

Thus, we have proved that the parity of n and m must be the same. \(\square \)

Lemma 7.5

Let \(m \le n\) be two nonnegative integers such that \(m \equiv n \pmod 2\). Let \(\delta :=(-1)^{(m-n)/2}\). Then,

$$\begin{aligned} F_n - F_m = F_{(n-\delta m)/2}L_{(n+\delta m)/2}. \end{aligned}$$

Proof

See Lemma 2 of [6]. \(\square \)

Lemma 7.6

Let \(F_n\) denote the Fibonacci sequence.

(i) Assume that \((p,k)\in \{ (2,267), (3,168), (5,114), (7,95) \}\) and let \(m_2\) be an integer with \(1\le m_2 \le 600\). Then the congruence

$$\begin{aligned} F_n\equiv m_2! \pmod {p^k} \end{aligned}$$

has no solutions in integers \(4\le n \le 10^{77}\).

(ii) Assume that \((p,k)\in \{ (2,56), (3,36), (5,26), (7,21) \}\) and let \(m_2\) be an integer with \(1\le m_2 \le 600\). Then the congruence

$$\begin{aligned} F_n\equiv m_2! \pmod {p^k} \end{aligned}$$

has no solutions in integers \(4\le n \le 10^{15}\).

Proof

  1. (i)

    The problem is finite since all parameters and unknowns in the congruence are bounded. However, a direct computation is not possible due to the size of the range of n. Thus, we used the constructive method indicated below. For given \(m_2\) and p we first we solved the congruence

    $$\begin{aligned} F_n\equiv m_2! \pmod p \end{aligned}$$

    by checking all values of \(0\le n \le \pi (p)\), where \(\pi (p)\) denotes the pth Pisano-period. Then we worked inductively. If the solutions of the congruence

    $$\begin{aligned} F_n\equiv m_2! \pmod {p^u} \end{aligned}$$

    are \(s_1, \dots , s_t\) modulo \(\pi (p)p^{u-1}\) then the solutions of the congruence

    $$\begin{aligned} F_n\equiv m_2! \pmod {p^{u+1}} \end{aligned}$$
    (7.1)

    must be among \(s_i+j\pi (p)p^{u-1}\) (\(i=1, \dots , t\), \(j=0,1,\dots , p-1\)) modulo \(\pi (p)p^u\). Here one must be careful again, since computing the Fibonacci number of index \(s_i+j\pi (p)p^{u-1}\) after a while is not possible, so instead we computed recursively the values \(\alpha ^{s_i+j\pi (p)p^{u}} \pmod {I_u}\) and \(\beta ^{s_i+j\pi (p)p^{u}} \pmod {I_u}\) where \(\alpha \) and \(\beta \) are the roots of the companion polynomial of the Fibonacci sequence and \(I_u\) denotes the ideal of the ring of integers of \({\mathbb {Q}}(\alpha )\) generated by \(p^u\) for \(u=1,\dots , k\). Clearly as \(\alpha ^s_i \pmod {I_u}\) and \(\alpha ^{j\pi (p)p^{u-1}} \pmod {I_u}\) were already computed in the previous step, we only raised \(\alpha ^{j\pi (p)p^{u-1}} \pmod {I_u}\) to power p and multiplied the result by \(\alpha ^s_i \pmod {I_u}\) to obtain \(\alpha ^{s_i+j\pi (p)p^{u}} \pmod {I_u}\), and did the same for \(\beta \). This procedure worked fast, and we could check the congruence

    $$\begin{aligned} \alpha ^{s_i+j\pi (p)p^{u}}-\beta ^{s_i+j\pi (p)p^{u}} \equiv (\alpha -\beta )m_2! \pmod {I_{u+1}} \end{aligned}$$

    to decide whether \(s_i+j\pi (p)p^{u-1}\) is a solution of (7.1) or not. The above algorithm programmed in Magma proved our assertion for given \(m_2, p, k\) in under a few seconds.

  2. (ii)

    The very same algorithm proves this statement in even less running time. \(\square \)

8 Proof of Theorem 2.3

Proof

By (5.40) we infer that for any solution of the equation (2.6) we must have

$$\begin{aligned} n\le 10^{77}. \end{aligned}$$

We will split the analysis into cases.

Case I. Assume \(m_1!\ge \sqrt{F_n}\).

Then we have

$$\begin{aligned} F_n\le (m_1!)^2 \end{aligned}$$
(8.1)

and we further split our treatment of Case I. into subcases:

Case I(1). Assume \(m_1\le 10^4\).

Then we have

$$\begin{aligned} m_1!< (m_1)^{m_1}\le 10^{4\cdot 10^4}, \end{aligned}$$

and by (8.1) we obtain

$$\begin{aligned} F_n<(m_1!)^2<10^{8\cdot 10^4},\quad \text {so}\quad n<3.828\cdot 10^5. \end{aligned}$$

By Lemma 7.1, we have

$$\begin{aligned} \begin{aligned}&\nu _2(F_n)\le 2+\nu _2(n/3)\le 2+ \log _2 \frac{n}{3} \le 2+\log _2 \frac{3.828\cdot 10^5}{3}< 19,\\&\nu _3(F_n)\le 1+\nu _3(n/4)\le 1+ \log _3 \frac{n}{4} \le 1+\log _3 \frac{3.828\cdot 10^5}{4}< 12,\\&\nu _5(F_n)\le \nu _5(n)\le \log _5 n \le \log _5 (3.828\cdot 10^5)< 8, \\&\nu _7(F_n)\le 1+\nu _7(n/8)\le 1+ \log _7 \frac{n}{8} \le 1+\log _7 \frac{3.828\cdot 10^5}{8} < 7. \end{aligned} \end{aligned}$$

Case I(1)(i). Assume \(m_2\ge 49\).

Then we clearly have

$$\begin{aligned} \begin{aligned}&\nu _2(m_1!+m_2!)\ge 47>\nu _2(F_n), \quad \nu _3(m_1!+m_2!)\ge 22> \nu _3(F_n), \\&\nu _5(m_1!+m_2!)\ge 12>\nu _5(F_n), \quad \nu _7(m_1!+m_2!)\ge 8>\nu _7(F_n). \end{aligned} \end{aligned}$$

Thus, Eq. (2.6) implies

$$\begin{aligned} \begin{aligned}&\nu _2(s)=\nu _2(F_n), \quad \nu _3(s)=\nu _3(F_n), \\&\nu _5(s)=\nu _5(F_n), \quad \nu _7(s)=\nu _7(F_n). \end{aligned} \end{aligned}$$
(8.2)

Now we compute the list \({\mathcal {L}}\) of all values

$$\begin{aligned} m_1!+m_2! \qquad \text { for}\qquad 49\le m_2 < m_1 \le 10^4 \end{aligned}$$

and we check for each \(1\le n \le 3.828 \cdot 10^5\) whether \(F_n-s \in {\mathcal {L}}\), where

$$\begin{aligned} s=2^{\nu _2(F_n)}3^{\nu _3(F_n)}5^{\nu _5(F_n)}7^{\nu _7(F_n)}. \end{aligned}$$

Since the size of \({\mathcal {L}}\) and the number of values for \(F_n\) is large, and also the values with which we need to do arithmetic are too large, instead of checking equality we check congruences

$$\begin{aligned} F_n-s \equiv m_1!+m_2! \pmod p \end{aligned}$$

for \(p=20011, 20021, 20023\). Denote the list \({\mathcal {L}}\) mod p by \({\mathcal {L}}_p\). First for every \(u=0,1,\ldots ,20010\) we collected all indices i such that \({\mathcal {L}}_{20011}[i]=u\) in a list \({\mathcal {J}}_u\). Then for the smallest positive residue \(u\equiv F_n-s\pmod {20011}\) and for all indices j in \({\mathcal {J}}[u]\) we checked if \({\mathcal {L}}_{20021}[j] \equiv F_n-s \pmod {20021}\) and \({\mathcal {L}}_{20023}[j] \equiv F_n-s \pmod {20023}\) holds. If for all j in \({\mathcal {J}}[u]\) one of the above congruences was false, then we excluded n from the list of possible solutions (at least in this case). The computation took 1085 s on an Intel Xeon W-2245 3.90GHz CPU processor and the only values for n which were not excluded by this procedure were \(n= 198489, 228652, 375659\). Then, as explained above, \(s=2^{\nu _2(F_n)}3^{\nu _3(F_n)}5^{\nu _5(F_n)}7^{\nu _7(F_n)}\) is fixed and we computed the value \(F_n-s\). If \(F_n-s=m_1!+m_2!\) with \(m_1>m_2\), then \(m_1!\) is the largest factorial which is smaller than \(F_n-s\), and we checked that \(F_n-s-m_1!\) is not a factorial, thus excluding that value of n, too. In the three remaining cases we obtained the following data:

n

s

\(m_1\)

198489

2

11444

228652

3

12987

375659

1

20271

and we conclude that none of the values \(n= 198489, 228652, 375659\) is a solution in this case.

Case I(1)(ii). Assume \(1\le m_2\le 48\) and \(m_1\ge 56\).

Then we additionally have \(m_1-m_2 \ge 8\) which clearly implies

$$\begin{aligned} \nu _p(m_1!+m_2!)=\nu _p(m_2!) \quad \quad \quad \text {for }p\in S. \end{aligned}$$

Thus, whenever for every \(p\in S\) either \(\nu _p(m_2!)\ne \nu _p(F_n)\) or

$$\begin{aligned} \nu _p(m_2!)= \nu _p(F_n) \quad \text {and} \quad \frac{F_n}{p^{\nu _p(F_n)}} \not \equiv \frac{m_2!}{p^{\nu _p(m_2!)}} \pmod p, \end{aligned}$$

then we must have

$$\begin{aligned} \nu _p(s)=\min (\nu _p(m_2!), \nu _p(F_n)) \quad \quad \quad \text {for }p\in S. \end{aligned}$$

Thus, s is explicitly given. So, we compute \(F_n-s\) and exclude all such values of n for which \(F_n-s\) is not the sum of two factorials, as we did it in Case I(1)(i). There are 1338980 cases when the pairs \((n,m_2)\) do not fulfill the above conditions. For each such pair \((n,m_2)\) we compute for each \(p\in S\) the value \(\nu _p(F_n-m_2!)\) and we see that

$$\begin{aligned} \nu _p(F_n-m_2!)<\nu _p(56!)<\nu _p(m_1!), \end{aligned}$$

which implies that

$$\begin{aligned} \nu _p(s)=\nu _p(F_n-m_2!) \quad \quad \quad \text {for }p\in S. \end{aligned}$$

Thus, also in these cases s is explicitly given, and then we compute \(F_n-s\) and exclude all such values of n for which \(F_n-s\) is not the sum of two factorials, as we did it in Case I(1)(i). There are only 3 cases where the above procedure does not work, namely \((n,m_2)=(1,1),(2,1),(3,2)\), when we do have \(F_n=m_2!\), which clearly cannot lead to a solution. The computation of this case took 2018 s on a Intel Xeon W-2245 3.90 GHz CPU processor.

Case I(1)(iii). Assume \(1\le m_2\le 48\) and \(m_1\le 55\).

Then

$$\begin{aligned} m_1!\le 55^{55} \end{aligned}$$

and by (8.1) we obtain

$$\begin{aligned} F_n\le (m_1!)^2 \le 55^{110},\qquad \text { so}\qquad n<920. \end{aligned}$$

Now for \(n<920\), \(1\le m_2\le 48\) and \(m_2<m_1\le 55\) we check whether

$$\begin{aligned} F_n-m_1!-m_2! \in {\mathscr {S}}, \end{aligned}$$

and if yes, then we have found a solution of our equation. Altogether, we found the solutions listed in Theorem 2.3. This case had a running time of a few seconds. (Clearly, one could also check for the condition \(F_n\le (m_1!)^2\) if interested only on the solutions belonging to Case I.)

Case I(2). Assume \(m_1>10^4\).

In this case we still have (8.1) (i.e. \(F_n\le (m_1!)^2\)) since we are in a subcase of Case I. Further, recall that by (5.40) all solutions of the Eq. (2.6) have

$$\begin{aligned} n\le 10^{77}. \end{aligned}$$
(8.3)

This together with Lemma 7.1 shows that

$$\begin{aligned} \begin{aligned}&\nu _2(F_n)\le 2+\nu _2(n/3)\le 2+ \log _2 \frac{n}{3} \le 2+\log _2 \frac{10^{77}}{3}< 257,\\&\nu _3(F_n)\le 1+\nu _3(n/4)\le 1+ \log _3 \frac{n}{4} \le 1+\log _3 \frac{10^{77}}{4}< 162,\\&\nu _5(F_n)\le \nu _5(n)\le \log _5 n \le \log _5 (10^{77})< 111, \\&\nu _7(F_n)\le 1+\nu _7(n/8)\le 1+ \log _7 \frac{n}{8} \le 1+\log _7 \frac{10^{77}}{8} < 92. \end{aligned} \end{aligned}$$

Case I(2)(i). Assume \(m_1>10^4\) and \(m_2\ge 600\).

Then we have

$$\begin{aligned} \begin{aligned}&\nu _2(m_1!+m_2!)\ge 596>\nu _2(F_n), \quad \nu _3(m_1!+m_2!)\ge 297> \nu _3(F_n), \\&\nu _5(m_1!+m_2!)\ge 148>\nu _5(F_n), \quad \nu _7(m_1!+m_2!)\ge 98>\nu _7(F_n). \end{aligned} \end{aligned}$$
(8.4)

This proves that we again have (8.2) implying that

$$\begin{aligned} s\le 2^{257}3^{162}5^{111}7^{92}. \end{aligned}$$

Using Lemma 7.3, we obtain

$$\begin{aligned} \nu _2(F_n-s)< & {} 1730 \log (6s^2) \log ^2 n \le 1730 \log (2^{515}3^{325}5^{222}7^{184}) \log ^2 (10^{77}) \\< & {} 10^{10.9}. \end{aligned}$$

This gives

$$\begin{aligned} \frac{m_2}{2}+\frac{m_2}{4}+\frac{m_2}{8}\le \nu _2(m_2!)=\nu _2(F_n-s)=10^{10.9}. \end{aligned}$$

Thus, \(m_2\le \frac{8}{7} \cdot 10^{10.9}<10^{11}\) and

$$\begin{aligned} m_2!\le m_2^{m_2}\le (10^{11})^{10^{11}}< 10^{11\cdot 10^{11}}. \end{aligned}$$

Hence,

$$\begin{aligned} m_2!+s\le 10^{11\cdot 10^{11}}+2^{257}3^{162}5^{111}7^{92}<2 \cdot 10^{11\cdot 10^{11}}. \end{aligned}$$

Now we use again Lemma 7.3 to obtain

$$\begin{aligned} \nu _2(F_n-(s+m_2!))< & {} 1730 \log (6(s+m_2!)^2) \log n \\\le & {} 1730 \log (6\cdot 4 \cdot 10^{22*10^{11}}) \log ^2 (10^{77}) < 10^{20.45}, \end{aligned}$$

and consequently

$$\begin{aligned} \frac{m_1}{2}< \nu _2(m_1!)=\nu _2(F_n-(s+m_2!))<10^{20.45}. \end{aligned}$$

We get \( m_1< 2\cdot 10^{20.45}<10^{20.8}\) and this implies

$$\begin{aligned} m_1!\le m_1^{m_1}\le (10^{20.8})^{10^{20.8}}< 10^{20.8\cdot 10^{20.8}}< 10^{10^{22.12}}. \end{aligned}$$

Now we get

$$\begin{aligned} F_n=m_1!+m_2!+s\le 10^{10^{22.12}} + 10^{11\cdot 10^{11}}+2^{257}3^{162}5^{111}7^{92}<2\cdot 10^{10^{22.12}}, \end{aligned}$$

so

$$\begin{aligned} n<10^{23}. \end{aligned}$$

We repeat the above procedure. Using Lemma 7.1, this shows that

$$\begin{aligned} \begin{aligned}&\nu _2(F_n)\le 2+\nu _2(n/3)\le 2+ \log _2 \frac{n}{3} \le 2+\log _2 \frac{10^{23}}{3}< 77,\\&\nu _3(F_n)\le 1+\nu _3(n/4)\le 1+ \log _3 \frac{n}{4} \le 1+\log _3 \frac{10^{23}}{4}< 48,\\&\nu _5(F_n)\le \nu _5(n)\le \log _5 n \le \log _5 (10^{23})< 33, \\&\nu _7(F_n)\le 1+\nu _7(n/8)\le 1+ \log _7 \frac{n}{8} \le 1+\log _7 \frac{10^{23}}{8} < 28. \end{aligned} \end{aligned}$$

By the assumption \(m_2\ge 600\) we get again (8.4) so equations (8.2) hold implying that

$$\begin{aligned} \begin{aligned}&\nu _2(s)< 77, \quad \nu _3(s)<48, \\&\nu _5(s)< 33, \quad \nu _7(s)<28. \end{aligned} \end{aligned}$$
(8.5)

Now using a short computer program we consider the equation

$$\begin{aligned} F_n=m_1!+m_2!+s \end{aligned}$$

modulo primes between 100 and 600. For each such prime p we have

$$\begin{aligned} F_n\equiv s \pmod p \end{aligned}$$

and the computer search shows that this congruence is fulfilled simultaneously for all primes between 100 and 600 if and only if

$$\begin{aligned} s\in \{ 1, 2, 3, 5, 8, 21, 144\}. \end{aligned}$$

That is, we must have

$$\begin{aligned} s=F_m \quad \quad \text {for }m=1,2,3,4,5,6,8,12. \end{aligned}$$

Now our Eq. (2.6) takes the form

$$\begin{aligned} F_n-F_m=m_1!+m_2! \end{aligned}$$
(8.6)

with \(m=1,2,3,4,5,6,8,12\). By Lemma 7.4, in Eq. (8.6) the parity of n and m must be the same. So, we can use Lemma 7.5 and we obtain

$$\begin{aligned} F_{(n-\delta m)/2}L_{(n+\delta m)/2}=m_1!+m_2!, \end{aligned}$$

where \(\delta =\pm 1\). Recall that since \(m_2\ge 600\), we have

$$\begin{aligned} \nu _2(m_1!+m_2!)\ge 596, \end{aligned}$$

and since \(\nu _2(L_k)\le 2\) (see Lemma 7.2), we obtain that

$$\begin{aligned} \nu _2(F_{(n-\delta m)/2})\ge 594. \end{aligned}$$

However, this shows that

$$\begin{aligned} n\ge 3\cdot 2^{592} > 10^{77}, \end{aligned}$$

which contradicts (8.3). So, we have shown that in Case I(2)(i) our equation has no solution.

Case I(2)(ii) Assume that \(m_1>10^4\) and \(m_2 < 600\).

Now we show that in this case

$$\begin{aligned} \begin{aligned}&\nu _2(s)< 267, \quad \nu _3(s)<168, \\&\nu _5(s)<114, \quad \nu _7(s)< 95. \end{aligned} \end{aligned}$$
(8.7)

For if not assume for example that \(\nu _2(s)\ge 267\). Consider the Eq. (2.6) as a congruence modulo \(2^{267}\). Thus we obtain that for any solution of (2.6) fulfilling the conditions of this subcase we have

$$\begin{aligned} F_n \equiv m_2! \pmod {2^{267}}. \end{aligned}$$

However, by Lemma 7.6 (i), this has no solutions with \(4\le n\le 10^{77}\). But solutions with \(n>10^{77}\) do not exist at all, and since \(m_1\) is large \(n<4\) also cannot happen in this case. So we conclude that if there exists a solution in the present subcase, then it must have \(\nu _2(s)< 267\). A similar reasoning proves the other inequalities of (8.7).

Now since \(s\le 2^{267}3^{168}5^{114}7^{95}\) we may use again the ideas implemented in Case I(2)(i). We have

$$\begin{aligned} m_2!+s\le 600!+2^{267}3^{168}5^{114}7^{95} \le 10^{1410} \end{aligned}$$

and using again Lemma 7.3 we obtain

$$\begin{aligned} \nu _2(F_n-(s+m_2!))< & {} 1730 \log (6(s+m_2!)^2) \log ^2 n \\\le & {} 1730 \log (6\cdot 10^{2820}) \log ^2 (10^{77}) < 10^{11.55}. \end{aligned}$$

Consequently,

$$\begin{aligned} \frac{m_1}{2}< \nu _2(m_1!)=\nu _2(F_n-(s+m_2!))<10^{11.55}, \end{aligned}$$

so we get \( m_1< 2\cdot 10^{11.55}<10^{12}\). This implies

$$\begin{aligned} m_1!\le m_1^{m_1}\le (10^{12})^{10^{12}}< 10^{12\cdot 10^{12}}< 10^{10^{13.1}}. \end{aligned}$$

Now we conclude by

$$\begin{aligned} F_n=m_1!+m_2!+s\le 10^{10^{13.1}} + 600!+2^{267}3^{168}5^{114}7^{95}<2\cdot 10^{10^{13.1}}, \end{aligned}$$

so

$$\begin{aligned} n<10^{15}. \end{aligned}$$

Using Lemma 7.6 (ii) the same way as we used its statement (i) at the beginning of this case, we obtain that

$$\begin{aligned} \begin{aligned}&\nu _2(s)< 56, \quad \nu _3(s)<36, \\&\nu _5(s)<26, \quad \nu _7(s)< 21. \end{aligned} \end{aligned}$$
(8.8)

Now using a short computer program as in Case I(2)(i) we considered the equation

$$\begin{aligned} F_n=m_1!+m_2!+s \end{aligned}$$

modulo primes between 100 and 800. For each such prime p we have

$$\begin{aligned} F_n\equiv m_2!+s \pmod p \end{aligned}$$

and the computer search shows that this congruence is fulfilled simultaneously for all primes between 100 and 800 if and only if

$$\begin{aligned} m_2!+s\in \{ 2, 3, 5, 8,13, 21, 34,55, 144, 377, 2584\}. \end{aligned}$$

That is, we must have

$$\begin{aligned} m_2!+s=F_m \quad \quad \text {for }m=3,4,5,6,7,8,9,10, 12, 14, 18. \end{aligned}$$

The running time for this computation was 112 s on a Intel Xeon W-2245 3.90GHz CPU processor.

Now our Eq. (2.6) takes the form

$$\begin{aligned} F_n-F_m=m_1! \end{aligned}$$
(8.9)

with \(m=3,4,5,6,7,8,9,10, 12, 14, 18\). By Lemma 7.4, in Eq. (8.9) the parity of n and m must be the same. So, we can use Lemma 7.5 and we obtain

$$\begin{aligned} F_{(n-\delta m)/2}L_{(n+\delta m)/2}=m_1!, \end{aligned}$$

where \(\delta =\pm 1\). Recall that by \(m_1\ge 10^4\) we have

$$\begin{aligned} \nu _2(m_1!)\ge 9995, \end{aligned}$$

and since by Lemma 7.2 we have \(\nu _2(L_k)\le 2\), we obtain that

$$\begin{aligned} \nu _2(F_{(n-\delta m)/2})\ge 9993. \end{aligned}$$

However, this shows that

$$\begin{aligned} n\ge 3\cdot 2^{9993} > 10^{77}, \end{aligned}$$

which contradicts (8.3). So we have shown that in Case I(2)(i) our equation has no solution.

Case II. We assume \(m_1!\le {\sqrt{F_n}}\).

Then from Eq. (2.6) with the notation \(s=2^a3^b5^c7^d\) we obtain

$$\begin{aligned} 1-2^a3^b\sqrt{5}^{2c+1}7^d\alpha ^{-n}=(\sqrt{5}\cdot m_1!+\sqrt{5}\cdot m_2!+\alpha ^{-n})\alpha ^{-n} \end{aligned}$$
(8.10)

and by the condition of Case II we have

$$\begin{aligned} \begin{aligned} \left| 1-2^a3^b\sqrt{5}^{2c+1}7^d\alpha ^{-n} \right|&< \left( 2\sqrt{5}\sqrt{F_n}+\alpha ^{-n} \right) \alpha ^{-n} \le \\&\le \left( 2\root 4 \of {5}\alpha ^{\frac{n}{2}}+\alpha ^{-n}\right) \alpha ^{-n} \le \frac{4}{\alpha ^{\frac{n}{2}}}. \end{aligned} \end{aligned}$$
(8.11)

We clearly may assume that \(n>10\), so \(4/\alpha ^{n/2}<0.4\). Now using Lemma 3.4 we infer that

$$\begin{aligned} |a\log 2+b\log 3+(2c+1)\log \sqrt{5}+d\log 7-n\log \alpha |<\frac{-\log 0.6}{0.4}\cdot 4\cdot \alpha ^{-\frac{n}{2}}<\frac{6}{\alpha ^{\frac{n}{2}}}. \end{aligned}$$

The conditions of Lemma 3.3 are fulfilled with

$$\begin{aligned} n=5, ~\alpha _1=\log 2,~ \alpha _2=\log 3,~\alpha _3= \log \sqrt{5},~ \alpha _4=\log 7,~ \alpha _5=\log \alpha , \end{aligned}$$

and

$$\begin{aligned}{} & {} x_1=a,~ x_2=b,~ x_3=2c+1,~ x_4=d,~ x_5=-n,~ X=2\cdot 10^{70}+1,\\{} & {} \quad ~c_2=6, ~c_5=0.5\cdot \log \alpha , ~H=10^{70},~q=1. \end{aligned}$$

Choosing \(C=10^{400}\) and using the LLL-algorithm implemented in Magma we obtain an LLL-reduced basis of \({\mathcal {L}}\). By Lemma 3.2 we get a lower bound \(c_6\) for the length of the shortest vector of \({\mathcal {L}}\). Finally, Lemma 3.3 provides the upper bound \(H\le 3077\). Now using Lemma 3.3 with

$$\begin{aligned} H=3078, ~X_0=2\cdot 3078+1, ~C=10^{28} \end{aligned}$$

by the above procedure we infer that \(H\le 219\). Now we use once more Lemma 3.3 with \(H=220\), \(X_0=2\cdot 220+1\), \(C=10^{24}\), and by the above procedure we get

$$\begin{aligned} H\le 199. \end{aligned}$$

This shows that \(n<200\) and consequently, \(m_2<m_1<36\). So to conclude the proof of our theorem for all natural numbers \(n < 200\) and \(m_2<m_1<36\) with \(F_n-m_1!-m_2!>0\) we check whether there exist \(a,b,c,d\in {\mathbb {N}}\) such that

$$\begin{aligned} F_n-m_1!-m_2!=2^a3^b5^c7^d, \end{aligned}$$

and we get exactly the solutions listed in Theorem 2.3. (Clearly, one could also check the condition \(F_n > (m_1!)^2\) if interested only in the solutions belonging to Case II). \(\square \)