login
A065892
Which composite number is n! ?: a(n) = k such that A002808(k) = n!, or 0 if n! is not composite.
1
0, 0, 2, 14, 89, 591, 4364, 36088, 331910, 3370110, 37487843, 453695312, 5937400048, 83567800394, 1258987455069, 20216786089860, 344733810100259, 6221338673520239, 118470005905053478, 2374008406467087461, 49939116469530531211, 1100312192659475223331, 25340966583568917929966
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