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.

Showing 1-1 of 1 results.

A361437 Numbers k such that k! - Sum_{i=1..k-1} (-1)^(k-i)*i! is prime.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 12, 15, 58, 59, 102, 111, 118, 164, 291, 589, 685, 1671, 1900, 1945, 4905, 9564
Offset: 1

Views

Author

Jack Braxton, Mar 11 2023

Keywords

Comments

Numbers k such that k! + A005165(k - 1) is prime.
a(23) > 7000. - Hugo Pfoertner, Mar 15 2023

Examples

			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.
		

Crossrefs

Cf. A361436 (the corresponding primes).
Cf. A001272, A005165 (alternating factorials), A071828.

Programs

  • PARI
    isok(k) = isprime(k! + sum(i=1, k-1, (-1)^(i+1)*(k-i)!)); \\ Michel Marcus, Mar 12 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
Showing 1-1 of 1 results.