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.

A062309 Number of ways writing n! as sums of a prime and a nonprime.

Original entry on oeis.org

0, 0, 2, 3, 6, 50, 307, 2329, 19907, 181263, 1736542, 19044663, 220730823, 2845615949, 39412442640
Offset: 1

Views

Author

Labos Elemer, Jul 05 2001

Keywords

Examples

			For n = 4: 4! = 24 = 23+1 = 2+22 = 3+21, so a(4) = 3.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(c = 0, m = n!); forprime(p = 2, m-1, if(!isprime(m - p), c++)); c;} \\ Amiram Eldar, Jul 17 2024

Formula

a(n) = A062602(n!).
a(n) = n!/2 - A062310(n) - A062311(n) for n >= 2. - Amiram Eldar, Jul 17 2024

Extensions

a(9)-a(13) from Sean A. Irvine, Mar 26 2023
a(14)-a(15) from Amiram Eldar, Jul 17 2024