login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A361436
Primes of the form k! - Sum_{i=1..k-1} (-1)^(k-i)*i!.
1
3, 7, 29, 139, 821, 5659, 44741, 515616581, 1389068025019, 2390389721955353653838200398484730341485707553165512827613149996957838364422981
OFFSET
1,1
COMMENTS
Primes of the form k! + A005165(k - 1).
EXAMPLE
139 is in the sequence because it is 5! + (4! - 3! + 2! - 1!).
PROG
(PARI) \\ here b(n) is n! + A005165(n-1).
b(n) = {n! - sum(i=1, n-1, (-1)^(n-i)*i!)}
{ for(k=1, 150, if(ispseudoprime(b(k)), print1(b(k), ", "))) } \\ Andrew Howroyd, Mar 12 2023
CROSSREFS
Cf. A005165 (alternating factorials), A071828, A361437 (the k's).
Sequence in context: A173280 A141477 A211371 * A302157 A294383 A082096
KEYWORD
hard,nonn
AUTHOR
Jack Braxton, Mar 11 2023
STATUS
approved