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.

Original entry on oeis.org

2, 3, 6, 216, 285
Offset: 1

Views

Author

Vincenzo Librandi, Jan 08 2018

Keywords

Comments

a(6) > 1622184 if it exists (see A001605). - Chai Wah Wu, Jan 23 2018

Examples

			2 is in the sequence because F(3)=2 and F(5)=5 are prime.
6 is in the sequence because F(11)=89 and F(13)=233 are prime.
		

Crossrefs

Programs

  • 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
  • Magma
    [n: n in [0..700] | IsPrime(Fibonacci(2*n+1)) and  IsPrime(Fibonacci(2*n-1))];
    
  • Maple
    with(combinat, fibonacci): select(k -> isprime(fibonacci(2*k+1)) and isprime(fibonacci(2*k-1)), [$1..500]); # Muniru A Asiru, Jan 25 2018
  • Mathematica
    Select[Range[0, 3000], PrimeQ[Fibonacci[2 # + 1]] && PrimeQ[Fibonacci[2 # - 1]] &]
  • PARI
    isok(n) = isprime(fibonacci(2*n-1)) && isprime(fibonacci(2*n+1)); \\ Michel Marcus, Jan 08 2018
    
  • Python
    from sympy import isprime
    A297624_list, k, a, b, c, aflag = [], 1, 1, 1, 2, False
    while k < 1000:
        cflag = isprime(c)
        if aflag and cflag:
            A297624_list.append(k)
        k, a, b, c, aflag = k + 1, c, b + c, b + 2*c, cflag # Chai Wah Wu, Jan 23 2018
    

Formula

From Chai Wah Wu, Jan 23 2018: (Start)
a(n) = (A279795(n)-1)/2 = (A281087(n)+1)/2 = (A073340(2n-1)+1)/2.
For n > 1, a(n) == 0 mod 3 as otherwise Fibonacci(2*k+1) or Fibonacci(2*k-1) is even. (End)