15
$\begingroup$

Note: These queries had come up during an earlier discussion: On Fibonacci numbers that are also highly composite. Am putting them up as a separate post.

Q: Are there any Fibonacci numbers that are sandwiched between twin primes? An observation: none of the first 30 odd Fibonacci numbers is sandwiched between twin primes.

$\endgroup$
5
  • 1
    $\begingroup$ Can you find a Fibonacci number $F_n>10$ for which $F_{n}+1$ is a prime? $\endgroup$ Commented Dec 31, 2022 at 11:37
  • 6
    $\begingroup$ Heuristically, $F_{n}\pm 1$ are simultaneously primes with probability $\asymp 1/n^2$ since $F_n$ grows exponentially and the density of primes is $1/\log x$. The convergence of $1/n^2$ suggests a finite number of such sandwiched Fibonaccis. Twin primes $(p,p+2)$ must satisfy $p\equiv -1 \bmod 6$, so a sandwiched Fibonacci number must be divisible by $6$. Since $F_n$ is periodic modulo $6$, a short computation shows $F_n \equiv 0 \bmod 6$ if and only if $n \equiv 0 \bmod 12$. I couldn't even find $n$ for which not both $F_{12n}-1,F_{12n}+1$ are composite. $\endgroup$ Commented Dec 31, 2022 at 11:38
  • 1
    $\begingroup$ Please restrict to one question per post. This is standard policy on this website. $\endgroup$
    – GH from MO
    Commented Dec 31, 2022 at 14:48
  • 1
    $\begingroup$ Sure. Moved qn 2 to another post $\endgroup$ Commented Dec 31, 2022 at 18:47
  • 3
    $\begingroup$ Why, please, are you Asking that without Posting helpful research? After which number did you give up your own search? $\endgroup$ Commented Jan 1, 2023 at 4:05

1 Answer 1

47
$\begingroup$

(In collaboration with Z. Chase.) A Fibonacci number $F_{n}$ is never sandwiched between two twin primes $(p,p+2)$.

This is because this would require $F_{n}+1$ to be a prime, but that can only happen iff $n=1,2,3$, and one can check that $F_{n}-1$ is not a prime in these cases.

The fact that $F_{n}+1$ is a prime iff $n=1,2,3$ is probably quite old. One reference is this OEIS page, where (the) Richard Guy shows

  1. $F_{4n}+1 = F_{2n-1} L_{2n+1}$,
  2. $F_{4n+1}+1 = F_{2n+1} L_{2n}$,
  3. $F_{4n+2}+1 = F_{2n+2} L_{2n}$,
  4. $F_{4n+3}+1 = F_{2n+1} L_{2n+2}$

where $L_n$ is the $n$th Lucas number.

In fact, we only need the first of these identities for your question, because if $F_{n}$ is sandwiched between twin primes $(p,p+2)$ then $F_n \equiv 0 \bmod 6$ implying $n \equiv 0 \bmod 12$.

$\endgroup$
2
  • 3
    $\begingroup$ Empirically (this is certainly known too) $F_{2n}$ divides $F_{4n+2}-1$, $F_{4n+1}-1$, $F_{4n-1}-1$ and $F_{2n+1}$ divides $F_{4n}-1$ for all $n$. For $n\ge 2$, the divisor is $\ge 2$ and smaller than the larger number, and hence in this way we see that $F_m-1$ is also non-prime for all $m\ge 7$. (Thus $F_m-1$ is prime only for $m=4,6$, namely equals $2,7$). $\endgroup$
    – YCor
    Commented Dec 31, 2022 at 19:52
  • 3
    $\begingroup$ @YCor Cool! Indeed, from your empirical observations and Guy's identities one might guess $F_{4n+2\varepsilon}-1 = F_{2n-1+\varepsilon} L_{2n+1+\varepsilon}$ ($\varepsilon=0,1$) and $F_{4n\pm 1}-1= F_{2n} L_{2n \pm1}$ hold, both of which are easily confirmed (and surely known -- yes, I checked the OEIS page oeis.org/A000071 and they are stated by Peter Bala). We see $F_m\pm 1$ are both composite for $m \ge 7$. (The OEIS page also contains the statement that $2$ and $7$ are the only primes in the sequence.) $\endgroup$ Commented Dec 31, 2022 at 20:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .