OFFSET
1,1
COMMENTS
Numbers k such that k! + A005165(k - 1) is prime.
a(23) > 7000. - Hugo Pfoertner, Mar 15 2023
EXAMPLE
2 is in the sequence because 2! + 1! = 3.
3 is in the sequence because 3! + (2! - 1!) = 7.
4 is in the sequence because 4! + (3! - 2! + 1!) = 29.
5 is in the sequence because 5! + (4! - 3! + 2! - 1!) = 139.
PROG
(PARI) isok(k) = isprime(k! + sum(i=1, k-1, (-1)^(i+1)*(k-i)!)); \\ Michel Marcus, Mar 12 2023
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Jack Braxton, Mar 11 2023
EXTENSIONS
Missing a(10) inserted and a(12)-a(18) from Andrew Howroyd, Mar 12 2023
a(19)-a(22) from Hugo Pfoertner, Mar 13 2023
a(23) from Michael S. Branicky, Oct 02 2024
STATUS
approved