OFFSET
1,3
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..25 (calculated using the data at A003604)
FORMULA
a(n) = n! - A003604(n) - 1. - Amiram Eldar, Aug 09 2024
EXAMPLE
For n = 4: 4! = 24 = A002808(14) is the 14th composite number.
MATHEMATICA
Table[n! - PrimePi[n!] - 1, {n, 1, 12}]
PROG
(PARI) a(n) = my(f = n!); f - primepi(f) - 1; \\ Amiram Eldar, Aug 09 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 28 2001
EXTENSIONS
More terms from Robert G. Wilson v, Nov 29 2001
Name clarified and a(17)-a(23) from Amiram Eldar, Aug 09 2024
STATUS
approved