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.

A271729 Numbers n such that 2*Fibonacci(n+2)+((-1)^n-3)/2 is a prime.

Original entry on oeis.org

1, 2, 6, 8, 14, 16, 32, 40, 66, 88, 112, 120, 146, 158, 318, 514, 630, 638, 680, 710, 1054, 1630, 2198, 2466, 2696, 2994, 3138, 3654, 3958, 5558, 7008, 11416, 11632, 13510, 19752, 24480
Offset: 1

Views

Author

Vincenzo Librandi, Apr 13 2016

Keywords

Comments

These numbers are the positions of prime numbers in A066629.

Crossrefs

Cf. A066629.

Programs

  • Magma
    [n: n in [0..2000] | IsPrime(2*Fibonacci(n+2)+((-1)^n-3) div 2)];
    
  • Maple
    with(combinat): A271729:=n->`if`(isprime(2*fibonacci(n+2)+((-1)^n-3)/2), n, NULL): seq(A271729(n), n=1..3*10^3); # Wesley Ivan Hurt, Apr 13 2016
  • Mathematica
    Select[Range[10000], PrimeQ[(2 Fibonacci[# + 2] + ((-1)^# - 3) / 2)] &]
  • PARI
    lista(nn) = for(n=1, nn, if(ispseudoprime(2*fibonacci(n+2)+((-1)^n-3)/2), print1(n, ", "))); \\ Altug Alkan, Apr 13 2016