Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #17 Sep 08 2022 08:46:16
%S 1,2,6,8,14,16,32,40,66,88,112,120,146,158,318,514,630,638,680,710,
%T 1054,1630,2198,2466,2696,2994,3138,3654,3958,5558,7008,11416,11632,
%U 13510,19752,24480
%N Numbers n such that 2*Fibonacci(n+2)+((-1)^n-3)/2 is a prime.
%C These numbers are the positions of prime numbers in A066629.
%p 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
%t Select[Range[10000], PrimeQ[(2 Fibonacci[# + 2] + ((-1)^# - 3) / 2)] &]
%o (Magma) [n: n in [0..2000] | IsPrime(2*Fibonacci(n+2)+((-1)^n-3) div 2)];
%o (PARI) lista(nn) = for(n=1, nn, if(ispseudoprime(2*fibonacci(n+2)+((-1)^n-3)/2), print1(n, ", "))); \\ _Altug Alkan_, Apr 13 2016
%Y Cf. A066629.
%K nonn,more
%O 1,2
%A _Vincenzo Librandi_, Apr 13 2016