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.

A003418 Least common multiple (or LCM) of {1, 2, ..., n} for n >= 1, a(0) = 1.

This page as a plain text file.
%I A003418 M1590 #479 Aug 20 2025 18:56:58
%S A003418 1,1,2,6,12,60,60,420,840,2520,2520,27720,27720,360360,360360,360360,
%T A003418 720720,12252240,12252240,232792560,232792560,232792560,232792560,
%U A003418 5354228880,5354228880,26771144400,26771144400,80313433200,80313433200,2329089562800,2329089562800
%N A003418 Least common multiple (or LCM) of {1, 2, ..., n} for n >= 1, a(0) = 1.
%C A003418 The minimal exponent of the symmetric group S_n, i.e., the least positive integer for which x^a(n)=1 for all x in S_n. - _Franz Vrabec_, Dec 28 2008
%C A003418 Product over all primes of highest power of prime less than or equal to n. a(0) = 1 by convention.
%C A003418 Also smallest number whose set of divisors contains an n-term arithmetic progression. - _Reinhard Zumkeller_, Dec 09 2002
%C A003418 An assertion equivalent to the Riemann hypothesis is: | log(a(n)) - n | < sqrt(n) * log(n)^2. - _Lekraj Beedassy_, Aug 27 2006. (This is wrong for n = 1 and n = 2. Should "for n large enough" be added? - _Georgi Guninski_, Oct 22 2011)
%C A003418 Corollary 3 of Farhi gives a proof that a(n) >= 2^(n-1). - _Jonathan Vos Post_, Jun 15 2009
%C A003418 Appears to be row products of the triangle T(n,k) = b(A010766) where b = A130087/A130086. - _Mats Granvik_, Jul 08 2009
%C A003418 Greg Martin (see link) proved that "the product of the Gamma function sampled over the set of all rational numbers in the open interval (0,1) whose denominator in lowest terms is at most n" equals (2*Pi)^(1/2)*a(n)^(-1/2). - _Jonathan Vos Post_, Jul 28 2009
%C A003418 a(n) = lcm(A188666(n), A188666(n)+1, ..., n). - _Reinhard Zumkeller_, Apr 25 2011
%C A003418 a(n+1) is the smallest integer such that all polynomials a(n+1)*(1^i + 2^i + ... + m^i) in m, for i=0,1,...,n, are polynomials with integer coefficients. - _Vladimir Shevelev_, Dec 23 2011
%C A003418 It appears that A020500(n) = a(n)/a(n-1). - _Asher Auel_, corrected by _Bill McEachen_, Apr 05 2024
%C A003418 n-th distinct value = A051451(n). - _Matthew Vandermast_, Nov 27 2009
%C A003418 a(n+1) = least common multiple of n-th row in A213999. - _Reinhard Zumkeller_, Jul 03 2012
%C A003418 For n > 2, (n-1) = Sum_{k=2..n} exp(a(n)*2*i*Pi/k). - _Eric Desbiaux_, Sep 13 2012
%C A003418 First column minus second column of A027446. - _Eric Desbiaux_, Mar 29 2013
%C A003418 For n > 0, a(n) is the smallest number k such that n is the n-th divisor of k. - _Michel Lagneau_, Apr 24 2014
%C A003418 Slowest growing integer > 0 in Z converging to 0 in Z^ when considered as profinite integer. - _Herbert Eberle_, May 01 2016
%C A003418 What is the largest number of consecutive terms that are all equal? I found 112 equal terms from a(370261) to a(370372). - _Dmitry Kamenetsky_, May 05 2019
%C A003418 Answer: there exist arbitrarily long sequences of consecutive terms with the same value; also, the maximal run of consecutive terms with different values is 5 from a(1) to a(5) (see link Roger B. Eggleton). - _Bernard Schott_, Aug 07 2019
%C A003418 Related to the inequality (54) in Ramanujan's paper about highly composite numbers A002182, also used in A199337: a(A329570(m))^2 is a (not minimal) bound above which all highly composite numbers are divisible by m, according to the right part of that inequality. - _M. F. Hasler_, Jan 04 2020
%C A003418 For n > 2, a(n) is of the form 2^e_1 * p_2^e_2 * ... * p_m^e_m, where e_m = 1 and e = floor(log_2(p_m)) <= e_1. Therefore, 2^e * p_m^e_m is a primitive Zumkeler number (A180332). Therefore, 2^e_1 * p_m^e_m is a Zumkeller number (A083207). Therefore, for n > 2, a(n) = 2^e_1 * p_m^e_m * r, where r is relatively prime to 2*p_m, is a Zumkeller number (see my proof at A002182 for details). - _Ivan N. Ianakiev_, May 10 2020
%C A003418 For n > 1, 2|(a(n)+2) ... n|(a(n)+n), so a(n)+2 .. a(n)+n are all composite and (part of) a prime gap of at least n.  (Compare n!+2 .. n!+n). - _Stephen E. Witham_, Oct 09 2021
%D A003418 J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 365.
%D A003418 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A003418 Seiichi Manyama, <a href="/A003418/b003418.txt">Table of n, a(n) for n = 0..2308</a> (first 501 terms from T. D. Noe)
%H A003418 R. Anderson and N. J. A. Sloane, <a href="/A003418/a003418_1.pdf">Correspondence, 1975</a>.
%H A003418 Dorin Andrica, Sorin Rădulescu, and George Cătălin Ţurcaş, <a href="https://doi.org/10.1007/978-3-030-55857-4_4">The Exponent of a Group: Properties, Computations and Applications</a>, Disc. Math. and Applications, Springer, Cham (2020), 57-108.
%H A003418 Javier Cilleruelo, Juanjo Rué, Paulius Šarka, and Ana Zumalacárregui, <a href="http://arxiv.org/abs/1112.3013">The least common multiple of sets of positive integers</a>, arXiv:1112.3013 [math.NT], 2011.
%H A003418 R. E. Crandall and C. Pomerance, Prime numbers: a computational perspective, <a href="http://www.ams.org/mathscinet-getitem?mr=2156291">MR2156291</a>, p. 61.
%H A003418 Roger B. Eggleton, <a href="https://www.jstor.org/stable/2690332">Least Common Multiple of {1,2,...,n}</a>, Mathematics Magazine, 61(1) (1988), pp. 47-48, Problem 1252.
%H A003418 Bakir Farhi, <a href="http://arxiv.org/abs/0906.2295">An identity involving the least common multiple of binomial coefficients and its application</a>, arXiv:0906.2295 [math.NT], 2009.
%H A003418 Bakir Farhi, <a href="https://www.jstor.org/stable/40391302">An identity involving the least common multiple of binomial coefficients and its application</a>, Amer. Math. Monthly 116(9) (2009), 836-839.
%H A003418 Steven Finch, <a href="/A003418/a003418.pdf">Cilleruelo's LCM Constants</a>, 2013. [Cached copy, with permission of the author]
%H A003418 V. L. Gavrikov, <a href="https://arxiv.org/abs/1806.09264">On property of least common multiple to be a D-magic number</a>, arXiv:1806.09264 [math.NT], 2018.
%H A003418 S. Labbé and E. Pelantová, <a href="http://arxiv.org/abs/1409.7510">Palindromic sequences generated from marked morphisms</a>, arXiv:1409.7510 [math.CO], 2014.
%H A003418 J. C. Lagarias, <a href="https://www.jstor.org/stable/2695443">An elementary problem equivalent to the Riemann hypothesis</a>, Am. Math. Monthly 109 (6) (2002) 534-543. <a href="https://arxiv.org/abs/math/0008177">arXiv:math/0008177 [math.NT]</a>, 2000-2001.
%H A003418 Peter Luschny and S. Wehmeier, <a href="http://arxiv.org/abs/0909.1838">The lcm(1, 2, ..., n) as a product of sine values sampled over the points in Farey sequences</a>, arXiv:0909.1838 [math.CA], 2009.
%H A003418 Des MacHale and Joseph Manning, <a href="http://dx.doi.org/10.1017/mag.2015.28">Maximal runs of strictly composite integers</a>, The Mathematical Gazette, 99, pp 213-219 (2015).
%H A003418 Greg Martin, <a href="http://arxiv.org/abs/0907.4384">A product of Gamma function values at fractions with the same denominator</a>, arXiv:0907.4384 [math.CA], 2009.
%H A003418 M. Nair, <a href="https://www.jstor.org/stable/2320934">On Chebychev-type inequalities for primes</a> Amer. Math. Monthly 89(2) (1982), 126-129.
%H A003418 S. Ramanujan, <a href="https://doi.org/10.1112/plms/s2_14.1.347">Highly composite numbers</a>, Proceedings of the London Mathematical Society ser. 2, vol. XIV, no. 1 (1915), pp 347-409. (A variant of a better quality with an additional footnote is available <a href="http://ramanujan.sirinudi.org/Volumes/published/ram15.html">here</a>.)
%H A003418 E. S. Selmer, <a href="http://www.mscand.dk/article/view/11662/9678">On the number of prime divisors of a binomial coefficient</a>, Math. Scand. 39 (1976), no. 2, 271-281 (1977).
%H A003418 Jonathan Sondow, <a href="http://dx.doi.org/10.1090/S0002-9939-03-07081-3">Criteria for irrationality of Euler's constant</a>, Proc. AMS 131 (2003), 3335.
%H A003418 Rosemary Sullivan and Neil Watling, <a href="http://www.emis.de/journals/INTEGERS/papers/n65/n65.Abstract.html">Independent divisibility pairs on the set of integers from 1 to n</a>, INTEGERS 13 (2013) #A65.
%H A003418 M. Tchebichef, <a href="http://gallica.bnf.fr/ark:/12148/bpt6k163969/f374">Mémoire sur les nombres premiers</a>, J. Math. Pures Appliquées 17 (1852), 366-390.
%H A003418 Helge von Koch, <a href="http://dx.doi.org/10.1007/BF02403071">Sur la distribution des nombres premiers</a>, Acta Math. 24 (1) (1901), 159-182.
%H A003418 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LeastCommonMultiple.html">Least Common Multiple</a>, <a href="https://mathworld.wolfram.com/ChebyshevFunctions.html">Chebyshev Functions</a>, <a href="https://mathworld.wolfram.com/MangoldtFunction.html">Mangoldt Function</a>.
%H A003418 <a href="/index/Di#divseq">Index to divisibility sequences</a>
%H A003418 <a href="/index/Cor#core">Index entries for "core" sequences</a>
%H A003418 <a href="/index/Lc#lcm">Index entries for sequences related to lcm's</a>
%F A003418 The prime number theorem implies that lcm(1,2,...,n) = exp(n(1+o(1))) as n -> infinity. In other words, log(lcm(1,2,...,n))/n -> 1 as n -> infinity. - _Jonathan Sondow_, Jan 17 2005
%F A003418 a(n) = Product (p^(floor(log n/log p))), where p runs through primes not exceeding n (i.e., primes 2 through A007917(n)). - _Lekraj Beedassy_, Jul 27 2004
%F A003418 Greg Martin showed that a(n) = lcm(1,2,3,...,n) = Product_{i = Farey(n), 0 < i < 1} 2*Pi/Gamma(i)^2. This can be rewritten (for n > 1) as a(n) = (1/2)*(Product_{i = Farey(n), 0 < i <= 1/2} 2*sin(i*Pi))^2. - _Peter Luschny_, Aug 08 2009
%F A003418 Recursive formula useful for computations: a(0)=1; a(1)=1; a(n)=lcm(n,a(n-1)). - _Enrique Pérez Herrero_, Jan 08 2011
%F A003418 From _Enrique Pérez Herrero_, Jun 01 2011: (Start)
%F A003418 a(n)/a(n-1) = A014963(n).
%F A003418 if n is a prime power p^k then a(n)=a(p^k)=p*a(n-1), otherwise a(n)=a(n-1).
%F A003418 a(n) = Product_{k=2..n} (1 + (A007947(k)-1)*floor(1/A001221(k))), for n > 1. (End)
%F A003418 a(n) = A079542(n+1, 2) for n > 1.
%F A003418 a(n) = exp(Sum_{k=1..n} Sum_{d|k} moebius(d)*log(k/d)). - _Peter Luschny_, Sep 01 2012
%F A003418 a(n) = A025529(n) - A027457(n). - _Eric Desbiaux_, Mar 14 2013
%F A003418 a(n) = exp(Psi(n)) = 2 * Product_{k=2..A002088(n)} (1 - exp(2*Pi*i * A038566(k+1) / A038567(k))), where i is the imaginary unit, and Psi the second Chebyshev's function. - _Eric Desbiaux_, Aug 13 2014
%F A003418 a(n) = A064446(n)*A038610(n). - _Anthony Browne_, Jun 16 2016
%F A003418 a(n) = A000142(n) / A025527(n) = A000793(n) * A225558(n). - _Antti Karttunen_, Jun 02 2017
%F A003418 log(a(n)) = Sum_{k>=1} (A309229(n, k)/k - 1/k). - _Mats Granvik_, Aug 10 2019
%F A003418 From _Petros Hadjicostas_, Jul 24 2020: (Start)
%F A003418 Nair (1982) proved that 2^n <= a(n) <= 4^n for n >= 9. See also Farhi (2009). Nair also proved that
%F A003418 a(n) = lcm(m*binomial(n,m): 1 <= m <= n) and
%F A003418 a(n) = gcd(a(m)*binomial(n,m): n/2 <= m <= n). (End)
%F A003418 Sum_{n>=1} 1/a(n) = A064859. - _Bernard Schott_, Aug 24 2020
%e A003418 LCM of {1,2,3,4,5,6} = 60. The primes up to 6 are 2, 3 and 5. floor(log(6)/log(2)) = 2 so the exponent of 2 is 2.
%e A003418 floor(log(6)/log(3)) = 1 so the exponent of 3 is 1.
%e A003418 floor(log(6)/log(5)) = 1 so the exponent of 5 is 1. Therefore, a(6) = 2^2 * 3^1 * 5^1 = 60. - _David A. Corneth_, Jun 02 2017
%p A003418 A003418 := n-> lcm(seq(i,i=1..n));
%p A003418 HalfFarey := proc(n) local a,b,c,d,k,s; a := 0; b := 1; c := 1; d := n; s := NULL; do k := iquo(n + b, d); a, b, c, d := c, d, k*c - a, k*d - b; if 2*a > b then break fi; s := s,(a/b); od: [s] end: LCM := proc(n) local i; (1/2)*mul(2*sin(Pi*i),i=HalfFarey(n))^2 end: # _Peter Luschny_
%p A003418 # next Maple program:
%p A003418 a:= proc(n) option remember; `if`(n=0, 1, ilcm(n, a(n-1))) end:
%p A003418 seq(a(n), n=0..33);  # _Alois P. Heinz_, Jun 10 2021
%t A003418 Table[LCM @@ Range[n], {n, 1, 40}] (* _Stefan Steinerberger_, Apr 01 2006 *)
%t A003418 FoldList[ LCM, 1, Range@ 28]
%t A003418 A003418[0] := 1; A003418[1] := 1; A003418[n_] := A003418[n] = LCM[n,A003418[n-1]]; (* _Enrique Pérez Herrero_, Jan 08 2011 *)
%t A003418 Table[Product[Prime[i]^Floor[Log[Prime[i], n]], {i, PrimePi[n]}], {n, 0, 28}] (* _Wei Zhou_, Jun 25 2011 *)
%t A003418 Table[Product[Cyclotomic[n, 1], {n, 2, m}], {m, 0, 28}] (* _Fred Daniel Kline_, May 22 2014 *)
%t A003418 a1[n_] := 1/12 (Pi^2+3(-1)^n (PolyGamma[1,1+n/2] - PolyGamma[1,(1+n)/2])) // Simplify
%t A003418 a[n_] := Denominator[Sqrt[a1[n]]];
%t A003418 Table[If[IntegerQ[a[n]], a[n], a[n]*(a[n])[[2]]], {n, 0, 28}] (* _Gerry Martens_, Apr 07 2018 [Corrected by _Vaclav Kotesovec_, Jul 16 2021] *)
%o A003418 (PARI) a(n)=local(t); t=n>=0; forprime(p=2,n,t*=p^(log(n)\log(p))); t
%o A003418 (PARI) a(n)=if(n<1,n==0,1/content(vector(n,k,1/k)))
%o A003418 (PARI) a(n)=my(v=primes(primepi(n)),k=sqrtint(n),L=log(n+.5));prod(i=1,#v,if(v[i]>k,v[i],v[i]^(L\log(v[i])))) \\ _Charles R Greathouse IV_, Dec 21 2011
%o A003418 (PARI) a(n)=lcm(vector(n,i,i)) \\ Bill Allombert, Apr 18 2012 [via _Charles R Greathouse IV_]
%o A003418 (PARI) n=1; lim=100; i=1; j=1; until(n==lim, a=lcm(j,i+1); i++; j=a; n++; print(n" "a);); \\ _Mike Winkler_, Sep 07 2013
%o A003418 (Sage) [lcm(range(1,n)) for n in range(1, 30)] # _Zerinvary Lajos_, Jun 06 2009
%o A003418 (Haskell)
%o A003418 a003418 = foldl lcm 1 . enumFromTo 2
%o A003418 -- _Reinhard Zumkeller_, Apr 04 2012, Apr 25 2011
%o A003418 (Magma) [1] cat [Exponent(SymmetricGroup(n)) : n in [1..28]]; // _Arkadiusz Wesolowski_, Sep 10 2013
%o A003418 (Magma) [Lcm([1..n]): n in [0..30]]; // _Bruno Berselli_, Feb 06 2015
%o A003418 (Scheme) (define (A003418 n) (let loop ((n n) (m 1)) (if (zero? n) m (loop (- n 1) (lcm m n))))) ;; _Antti Karttunen_, Jan 03 2018
%o A003418 (Python)
%o A003418 from functools import reduce
%o A003418 from operator import mul
%o A003418 from sympy import sieve
%o A003418 def integerlog(n,b): # find largest integer k>=0 such that b^k <= n
%o A003418     kmin, kmax = 0,1
%o A003418     while b**kmax <= n:
%o A003418         kmax *= 2
%o A003418     while True:
%o A003418         kmid = (kmax+kmin)//2
%o A003418         if b**kmid > n:
%o A003418             kmax = kmid
%o A003418         else:
%o A003418             kmin = kmid
%o A003418         if kmax-kmin <= 1:
%o A003418             break
%o A003418     return kmin
%o A003418 def A003418(n):
%o A003418     return reduce(mul,(p**integerlog(n,p) for p in sieve.primerange(1,n+1)),1) # _Chai Wah Wu_, Mar 13 2021
%o A003418 (Python) # generates initial segment of sequence
%o A003418 from math import gcd
%o A003418 from itertools import accumulate
%o A003418 def lcm(a, b): return a * b // gcd(a, b)
%o A003418 def aupton(nn): return [1] + list(accumulate(range(1, nn+1), lcm))
%o A003418 print(aupton(30)) # _Michael S. Branicky_, Jun 10 2021
%Y A003418 Row products of A133233.
%Y A003418 Cf. A000142, A000793, A002110, A002182, A002201, A002944, A014963, A020500, A025527, A038610, A051173, A064446, A064859, A069513, A072938, A093880, A094348, A096179, A099996, A102910, A106037, A119682, A179661, A193181, A225558, A225630, A225632, A225640, A225642.
%Y A003418 Cf. A025528 (number of prime factors of a(n) with multiplicity).
%Y A003418 Cf. A275120 (lengths of runs of consecutive equal terms), A276781 (ordinal transform from term a(1)=1 onward).
%K A003418 nonn,easy,core,nice,changed
%O A003418 0,3
%A A003418 Roland Anderson (roland.anderson(AT)swipnet.se)