OFFSET
0,3
COMMENTS
Squarefree kernel of both n! and lcm(1, 2, 3, ..., n).
a(n) = lcm(core(1), core(2), core(3), ..., core(n)) where core(x) denotes the squarefree part of x, the smallest integer such that x*core(x) is a square. - Benoit Cloitre, May 31 2002
The sequence can also be obtained by taking a(1) = 1 and then multiplying the previous term by n if n is coprime to the previous term a(n-1) and taking a(n) = a(n-1) otherwise. - Amarnath Murthy, Oct 30 2002; corrected by Franklin T. Adams-Watters, Dec 13 2006
REFERENCES
Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.3, p. 14, "n?".
József Sándor, Dragoslav S. Mitrinovic, Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Section VII.35, p. 268.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2370 (first 401 terms from T. D. Noe)
Jens Askgaard, On the additive period length of the Sprague-Grundy function of certain Nim-like games, arXiv:1902.06299 [math.CO], 2019.
Klaus Dohmen and Martin Trinks, An Abstraction of Whitney's Broken Circuit Theorem, arXiv:1404.5480 [math.CO], 2014.
Romeo Meštrović, Euclid's theorem on the infinitude of primes: a historical survey of its proofs (300 BC--2012) and another new proof, arXiv:1202.3670 [math.HO], 2012. - From N. J. A. Sloane, Jun 13 2012
J. Barkley Rosser and Lowell Schoenfeld, Approximate formulas for some functions of prime numbers, Illinois J. Math., Vol. 6, No. 1 (1962), 64-94.
Eric Weisstein's World of Mathematics, Primorial.
FORMULA
Asymptotic expression for a(n): exp((1 + o(1)) * n) where o(1) is the "little o" notation. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 08 2001
For n > 0, log(a(n)) < 1.01624*n. [Rosser and Schoenfeld, 1962; Sándor et al., 2005] - N. J. A. Sloane, Apr 04 2017
a(n) <= A179215(n). - Reinhard Zumkeller, Jul 05 2010
Sum_{n>=0} 1/a(n) = A249270. - Amiram Eldar, Nov 08 2020
EXAMPLE
a(5) = a(6) = 2*3*5 = 30;
a(7) = 2*3*5*7 = 210.
MAPLE
A034386 := n -> mul(k, k=select(isprime, [$1..n])); # Peter Luschny, Jun 19 2009
# second Maple program:
a:= proc(n) option remember; `if`(n=0, 1,
`if`(isprime(n), n, 1)*a(n-1))
end:
seq(a(n), n=0..36); # Alois P. Heinz, Nov 26 2020
MATHEMATICA
q[x_]:=Apply[Times, Table[Prime[w], {w, 1, PrimePi[x]}]]; Table[q[w], {w, 1, 30}]
With[{pr=FoldList[Times, 1, Prime[Range[20]]]}, Table[pr[[PrimePi[n]+1]], {n, 0, 40}]] (* Harvey P. Dale, Apr 05 2012 *)
Table[ResourceFunction["Primorial"][i], {i, 1, 40}] (* Navvye Anand, May 22 2024 *)
PROG
(PARI) a(n)=my(v=primes(primepi(n))); prod(i=1, #v, v[i]) \\ Charles R Greathouse IV, Jun 15 2011
(PARI) a(n)=lcm(primes([2, n])) \\ Jeppe Stig Nielsen, Mar 10 2019
(SageMath)
def sharp_primorial(n): return sloane.A002110(prime_pi(n))
[sharp_primorial(n) for n in (0..30)] # Giuseppe Coppoletta, Jan 26 2015
(Python)
from sympy import primorial
def A034386(n): return 1 if n == 0 else primorial(n, nth=False) # Chai Wah Wu, Jan 11 2022
(Magma) [n eq 0 select 1 else LCM(PrimesInInterval(1, n)) : n in [0..50]]; // G. C. Greubel, Jul 21 2023
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
Offset changed and initial term added by Arkadiusz Wesolowski, Jun 04 2011
STATUS
approved