OFFSET
1,2
COMMENTS
Except for Fibonacci(4) = 3, if Fibonacci(n) is prime, then n is also prime. However, if n is prime, Fibonacci(n) might be composite, as, for example, Fibonacci(19) = 4181 = 37 * 113. - Alonso del Arte, Jan 28 2014
The values are pairwise relatively prime because gcd(Fib(m), Fib(n)) = Fib(gcd(m, n)) and this equals Fib(1) = 1 when m!=n are prime numbers. - Lee A. Newberg, May 05 2023
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..642 (first 100 terms from T. D. Noe)
Michel Bataille, Problem 90.G, Problem Corner, The Mathematical Gazette, Vol. 90, No. 518 (2006), p. 354; Solution, ibid., Vol. 91, No. 520 (2007), pp. 160-161.
FORMULA
From Jianing Song, Dec 26 2018: (Start)
a(n) == 1 (mod prime(n)) if prime(n) == 1, 4 (mod 5).
a(n) == -1 (mod prime(n)) if prime(n) == 2, 3 (mod 5). (End)
a(n) == Sum_{k=0..floor((prime(n)-1)/2)} (-1)^k * binomial(2*k,k) (mod prime(n)) (Bataille, 2006). - Amiram Eldar, Jul 02 2023
MAPLE
with(combinat); for i from 1 to 50 do fibonacci(ithprime(i)); od;
# second Maple program:
a:= n-> (<<0|1>, <1|1>>^ithprime(n))[1, 2]:
seq(a(n), n=1..30); # Alois P. Heinz, Jan 20 2017
MATHEMATICA
Fibonacci[Prime[Range[30]]] (* Harvey P. Dale, Mar 25 2013 *)
PROG
(PARI) a(n)=fibonacci(prime(n)) \\ Charles R Greathouse IV, Apr 26 2012
(Magma) [Fibonacci(NthPrime(n)): n in [1..80]]; // Vincenzo Librandi, May 22 2015
(GAP) a:=List(Filtered([1..100], IsPrime), i->Fibonacci(i));; Print(a); # Muniru A Asiru, Dec 29 2018
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
John C. Hallyburton, Jr. (jhallyburton(AT)mx1.AspenRes.Com)
STATUS
approved