OFFSET
1,2
COMMENTS
All odd numbers are in this sequence, since the Fibonacci number with index 2m+1 is the sum of the squares of the two Fibonacci numbers with indices m and m+1. Those with even indices ultimately depend on certain Lucas numbers being the sum of two squares (see A124132). Joint work with Kevin O'Bryant and Dennis Eichhorn.
Numbers n such that Fibonacci(n) or Fibonacci(n)/2 is a square are only 0, 1, 2, 3, 6, 12. So a and b must be distinct and nonzero for all values of this sequence except 1, 2, 3, 6, 12. - Altug Alkan, May 04 2016
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..1322 (terms 1..210 from Joerg Arndt)
FORMULA
EXAMPLE
14 is in the sequence because F_14=377=11^2+16^2.
16 is not in the sequence because F_16=987 is congruent to 3 (mod 4).
MATHEMATICA
Select[Range@ 128, SquaresR[2, Fibonacci@ #] > 0 &] (* Michael De Vlieger, May 04 2016 *)
PROG
(PARI) for(n=1, 10^6, t=fibonacci(n); s=sqrtint(t); forstep(i=s, 1, -1, if(issquare(t-i*i), print1(n, ", "); break))) \\ Ralf Stephan, Sep 15 2013
(PARI) is2s(n)={my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]%2 && f[i, 1]%4==3, return(0))); 1; } \\ see A001481
for(n=1, 10^6, if(is2s(fibonacci(n)), print1(n, ", "))); \\ Joerg Arndt, Sep 15 2013
(Haskell)
a124134 n = a124134_list !! (n-1)
a124134_list = filter ((> 0) . a000161 . a000045) [1..]
-- Reinhard Zumkeller, Oct 10 2013
(Python)
from itertools import count, islice
from sympy import factorint, fibonacci
def A124134_gen(): # generator of terms
return filter(lambda n:n & 1 or all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(fibonacci(n)).items()), count(1))
CROSSREFS
KEYWORD
nonn
AUTHOR
Melvin J. Knight (melknightdr(AT)verizon.net), Nov 30 2006
EXTENSIONS
More terms from Ralf Stephan, Sep 15 2013
STATUS
approved