login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A300902
a(n) = n! / Product_{p prime < n}.
2
1, 1, 2, 3, 4, 20, 24, 168, 192, 1728, 17280, 190080, 207360, 2695680, 2903040, 43545600, 696729600, 11844403200, 12541132800, 238281523200, 250822656000, 5267275776000, 115880067072000, 2665241542656000, 2781121609728000, 69528040243200000, 1807729046323200000
OFFSET
0,3
COMMENTS
Sum_{n >= 0} 1/a(n) = 3.1868081118360746...
LINKS
FORMULA
a(n) = A000142(n)/A034386(n-1) for n>0, a(0) = 1.
a(n) = A049614(n)*A089026(n) for n>0, a(0) = 1.
EXAMPLE
a(6) = 6! / Product_{p prime < 6} = 6 * 5 * 4 * 3 * 2/(5 * 3 * 2) = 6 * 4 = 24.
MAPLE
a:= n-> n!/mul(`if`(isprime(i), i, 1), i=1..n-1):
seq(a(n), n=0..30); # Alois P. Heinz, Mar 16 2018
MATHEMATICA
Table[n!/(Times@@Prime[Range[PrimePi[n - 1]]]), {n, 0, 29}] (* Alonso del Arte, Mar 25 2018 *)
PROG
(PARI) a(n) = my(v=primes(primepi(n-1))); n!/prod(k=1, #v, v[k]); \\ Michel Marcus, Mar 15 2018
(Julia)
using Nemo
A300902(n) = div(fac(n), primorial(max(1, n-1)))
[A300902(n) for n in 0:26] |> println # Peter Luschny, Mar 16 2018
(Python)
from __future__ import division
from sympy import isprime
A300902_list, m = [1], 1
for n in range(1, 501):
m *= n
A300902_list.append(m)
if isprime(n):
m //= n # Chai Wah Wu, Mar 16 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Pedro Caceres, Mar 14 2018
STATUS
approved