[Math] Which Fibonacci numbers are the sum of two squares

nt.number-theory

The Fibonacci numbers ($F_0=0$, $F_1=1$, $F_{n}=F_{n-1}+F_{n-2}$) have the identity $$F_{2k+1}=F_k^2 + F_{k+1}^2.$$
In particular, if $n$ is odd, then $F_n$ is a sum of two squares. Are there infinitely many even $n$ for which $F_n$ is a sum of two squares?


Some comments (building from my notes and also from the comments and answers below)

The set of even $n$ (nonnegative, naturally) with $F_{2n}$ the sum of two squares begins
$$\{ 0,2,6,12,14,26,38,62,74,86,98,122,134,146,158,182,222,254,$$
$$326,338,366,398,446,614,626,698,722,794,866,1022,1046,\ldots\},$$
using the tables at Mersennus.net. There are five entries in this list that are not 2 mod 12: three small numbers (0, 6, 12) that can be forgiven their impertinence, but also 222 and 366 (both are 6 mod 12, and also 78 mod 144).

The list of possible indices (possible because not all of the factorizations are complete) continues
$$\ldots, 1082,1226,1238,1418,1646,1814,2174,2246,2258,2282,2294,$$
$$2426,2498,2558,3002,3062,3302,3494,3662,3698,3782,3902,4058,$$
$$4106,4178,4274,4394,4478,4502,4574,4622,4682,4826,4874,4898,4934,$$
$$4946,5102,5174,5558,5594,5702,5714,5798,6074,6326,6362,6542,6614,$$
$$6638,6746,6794,6914,6998,7022,7154,7278,7286,7382,7394,7454,7494,$$
$$7538,7586,7694,7754,7838,7934,8006,8054,8138,8186,8222,8258,8486,$$
$$8522,8594,8906,9038,9074,9194,9206,9242,9326,9398,9446,9638,9662,$$
$$9782,9806,9818,9866,9902$$

This list contains two more indices that are not 2 mod 12: 7278 (possibly giving a sum of two squares) and 7494 (definitely giving a sum of two squares). Note $366-222=12^2$ and $7494-7278=6^4$. Also, all four of 222, 366, 7278, 7494 have the form $6p$ (with $p$ a prime, of course).


The Fibonacci numbers are periodic modulo $m$ (for any $m>1$). Considering the sequence modulo 4, for example, it repeats 0, 1, 1, 2, 3, 1. Since the sum of two squares is never 3 mod 4, we learn that $F_{6n+4}$ is never the sum of two squares. Varying the modulus allows us to eliminate many other congruence classes. There are some numbers, for example $F_{78}$, that are not the sum of two squares but do not seem to be eliminatable in this manner.


If $n$ is negative and even, then $F_n$ is negative. This restricts the possibilities for an algebraic family (such as the one that exists for odd-indices).


The Lucas numbers are $L_0=2,L_1=1,L_{n}=L_{n-1}+L_{n-2}$. The identity $F_{2n}=F_nL_n$, coupled with the easy fact that $\gcd(F_n,L_n)$ is 1 or 2, implies that $F_{2n}$ is the sum of two squares if and only if both $F_n$ and $L_n$ are.

Best Answer

This is not a solution, just some thoughts which are too long for a comment. I have added proofs of Will Jagy and Junkies comments/conjectures which are fairly interesting on their own.

First, the Fibonacci numbers are a divisibility sequence, which means that $$\gcd(F_n,F_m)=F_{\gcd(n,m)}.$$
Added: Proof of part of Will Jagy's Observation:

Claim: If $n\equiv 5\pmod{6}$ then $L_n$, and hence $F_{2n}$ are divisible by some prime $p\equiv 3 \pmod{4}$.

Proof: Look at $L_n$ modulo $4$. Then the sequence is $L(0)\equiv 2$, $L(1)\equiv 1$, $L(2)\equiv 3$, $L(3)\equiv 0$, $L(4)\equiv 3$, $L(5)\equiv 3$, $L(6)\equiv 2$, $L(7)\equiv 1$, and at this point it must repeat. The cycle length is $6$, and $L(5)\equiv 3$. This means that $L(5+6k)\equiv 3\pmod{4}$ for all $k$. Hence $L(5+6k)$ is always divisible by a prime congruent to $3$ mod $4$.

Since $L_n |L_{kn}$ when $k$ is odd, we can conclude that if $p\equiv 5 \pmod{6}$ divides $n$, then some prime $q\equiv 3\pmod{4}$ must divide $F_{2n}$. This is because either $2|n$, and hence $3|F_{2n}$, or $n$ is odd, and $L_p|L_n$ so that $q|F_{2n}$.

Added Proof Of Junkie's Comment:

Claim: The density of even Fibonacci numbers which are not divisible by some prime of the form $3+4k$ is $0$.

Proof: This is a corollary of Will Jagy's observation. Since the density of numbers which are not divisible by a prime of the form $5+6k$ is zero, it follows from the previous claim that the density of even Fibonacci numbers not divisible by a prime of the form $3+4k$ is $0$.

Conjectures and other thoughts: Recall that we can write $F_n$ as a sum of two squares if it has no prime factors of the form $3+4k$.

Conjecture 1: The only Fibonacci number of the form $F_{2n}$ which is divisible by some prime of the form $3+4k$ and can be written as the sum of two squares is $F_{12}$.

$F_{12}$ is a very special Fibonacci number for a few reasons. One is that it is the only nontrivial square. If we change the condition to a sum of two nonzero squares, then $F_{12}$ is automatically excluded. Also, since no other Fibonacci numbers are squares, nothing else is affected. Hence we can rephrase conjecture 1 as:

Conjecture 1: If $F_{2n}$ is divisible by some prime of the form $3+4k$ then it cannot be written as the sum of two nonzero squares.

One reason for this conjecture is that it checks out numerically in large range, up to $F_{1000}$. Also, it would be nice if it was true.

Assuming this, by the divisibility property, given a prime $p=3+4k$, we need only care about the first time it appears in the Fibonacci Sequence. There is a theorem which states that $$F_{p-\left(\frac{p}{5}\right)}\equiv 0 \pmod{p},\ \ \ \ \ \ \ \ \ (1) $$ where $\left(\frac{p}{5}\right)$ is the Legendre symbol. Conjecture 1 would imply that if $2n$ is divisible by $p-\left(\frac{p}{5}\right)$ for any $p\equiv 3 \pmod{4}$, then $F_{2n}$ is not the sum of two nonzero squares.

Previously, I said some things about what happens if the above were an "if and only if" for primes of the form $3+4k$ (it clearly isn't for $1+4k$) Small update: It also is just false for $3+4k$, since $3571=3+4k$, is prime and divides $F_{68}$.

Examples: The first few primes congruent to $3$ mod $4$ less then $100$ are $$3,7,11,19,23,31,41,47,59,67,71,79,83,87$$ and they divide respectively $$F_4, F_8, F_{10}, F_{18}, F_{24}, F_{30}, F_{40}, F_{48}, F_{58}, F_{68}, F_{70}, F_{78}, F_{84}, F_{88}.$$

So in particular, (assuming conjecture 1) if I want $F_{2n}$ to be a sum of two nonzero squares, $2n$ cannot be divisible by any of the above. I.e. we cannot have any of $$2|n, \ 5|n, \ 9|n,\ 29|n,\ 39|n .$$ This idea can give us a large list of primes, none of which can divide $n$, but that is about all I can get it to do.

Related Question