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.

A300902 a(n) = n! / Product_{p prime < n}.

Original entry on oeis.org

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

Views

Author

Pedro Caceres, Mar 14 2018

Keywords

Comments

Sum_{n >= 0} 1/a(n) = 3.1868081118360746...

Examples

			a(6) = 6! / Product_{p prime < 6} = 6 * 5 * 4 * 3 * 2/(5 * 3 * 2) = 6 * 4 = 24.
		

Crossrefs

Programs

  • 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
    
  • 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 *)
  • PARI
    a(n) = my(v=primes(primepi(n-1))); n!/prod(k=1, #v, v[k]); \\ Michel Marcus, Mar 15 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

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.