cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A297624 Numbers k such that Fibonacci(2*k+1) and Fibonacci(2*k-1) are prime.

This page as a plain text file.
%I A297624 #41 Sep 08 2022 08:46:20
%S A297624 2,3,6,216,285
%N A297624 Numbers k such that Fibonacci(2*k+1) and Fibonacci(2*k-1) are prime.
%C A297624 a(6) > 1622184 if it exists (see A001605). - _Chai Wah Wu_, Jan 23 2018
%F A297624 From _Chai Wah Wu_, Jan 23 2018: (Start)
%F A297624 a(n) = (A279795(n)-1)/2 = (A281087(n)+1)/2 = (A073340(2n-1)+1)/2.
%F A297624 For n > 1, a(n) == 0 mod 3 as otherwise Fibonacci(2*k+1) or Fibonacci(2*k-1) is even. (End)
%e A297624 2 is in the sequence because F(3)=2 and F(5)=5 are prime.
%e A297624 6 is in the sequence because F(11)=89 and F(13)=233 are prime.
%p A297624 with(combinat, fibonacci): select(k -> isprime(fibonacci(2*k+1)) and isprime(fibonacci(2*k-1)), [$1..500]); # _Muniru A Asiru_, Jan 25 2018
%t A297624 Select[Range[0, 3000], PrimeQ[Fibonacci[2 # + 1]] && PrimeQ[Fibonacci[2 # - 1]] &]
%o A297624 (Magma) [n: n in [0..700] | IsPrime(Fibonacci(2*n+1)) and  IsPrime(Fibonacci(2*n-1))];
%o A297624 (PARI) isok(n) = isprime(fibonacci(2*n-1)) && isprime(fibonacci(2*n+1)); \\ _Michel Marcus_, Jan 08 2018
%o A297624 (Python)
%o A297624 from sympy import isprime
%o A297624 A297624_list, k, a, b, c, aflag = [], 1, 1, 1, 2, False
%o A297624 while k < 1000:
%o A297624     cflag = isprime(c)
%o A297624     if aflag and cflag:
%o A297624         A297624_list.append(k)
%o A297624     k, a, b, c, aflag = k + 1, c, b + c, b + 2*c, cflag # _Chai Wah Wu_, Jan 23 2018
%o A297624 (GAP) o := [];; for k in [1..500] do if IsPrime(Fibonacci(2*k+1)) and IsPrime(Fibonacci(2*k-1)) then Add(o,k); fi; od; A297624 := o; # _Muniru A Asiru_, Jan 25 2018
%Y A297624 Cf. A000045, A001605, A073340, A117517, A117595, A279795, A281087.
%K A297624 nonn,more
%O A297624 1,1
%A A297624 _Vincenzo Librandi_, Jan 08 2018