A237443 Numbers m such that (2m)! - m! + 1 is prime.
1, 2, 7, 13, 23, 5666, 32918
Offset: 1
Examples
2 is in the sequence because 4! - 2! + 1 = 23 is prime. 7 is in the sequence because 14! - 7! + 1 = 87178286161 is prime. 12 is not in the sequence because 24! - 12! + 1 = 620448401733238960358401 = 587 * 21523 * 49109415278124401.
Crossrefs
Cf. A118812 (corresponding primes).
Programs
-
Mathematica
Select[Range[100], PrimeQ[(2#)! - #! + 1] &] (* Alonso del Arte, Feb 09 2014 *)
-
PARI
for(n = 1, 2500, if(isprime((2*n)! - n! + 1), print1(n, ", ")))
Extensions
a(6) from Michal Paulovic, Nov 22 2023
a(7) from Kellen Shenton, Dec 21 2024
Comments