login
A062309
Number of ways writing n! as sums of a prime and a nonprime.
0
0, 0, 2, 3, 6, 50, 307, 2329, 19907, 181263, 1736542, 19044663, 220730823, 2845615949, 39412442640
OFFSET
1,3
FORMULA
a(n) = A062602(n!).
a(n) = n!/2 - A062310(n) - A062311(n) for n >= 2. - Amiram Eldar, Jul 17 2024
EXAMPLE
For n = 4: 4! = 24 = 23+1 = 2+22 = 3+21, so a(4) = 3.
PROG
(PARI) a(n) = {my(c = 0, m = n!); forprime(p = 2, m-1, if(!isprime(m - p), c++)); c; } \\ Amiram Eldar, Jul 17 2024
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Labos Elemer, Jul 05 2001
EXTENSIONS
a(9)-a(13) from Sean A. Irvine, Mar 26 2023
a(14)-a(15) from Amiram Eldar, Jul 17 2024
STATUS
approved