A051451 a(n) = lcm{ 1,2,...,x } where x is the n-th prime power (A000961).
1, 2, 6, 12, 60, 420, 840, 2520, 27720, 360360, 720720, 12252240, 232792560, 5354228880, 26771144400, 80313433200, 2329089562800, 72201776446800, 144403552893600, 5342931457063200, 219060189739591200, 9419588158802421600, 442720643463713815200
Offset: 1
Examples
lcm[1,...,n] is 2520 for n=9 and 10. The smallest such n's are always prime powers, where A003418 jumps.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..377 (terms 1..100 from T. D. Noe)
- Thomas Baruchel and Carsten Elsner, On error sums formed by rational approximations with split denominators, arXiv preprint arXiv:1602.06445 [math.NT], 2016.
- Russell Easterly, Product Bases A Million Ways to Count [Archive link]
- OEIS Wiki, LCM numeral system
- Mike Winkler, Table of n, a(n), p for n = 3..200, 2013.
- Index entries for sequences related to lcm's
Programs
-
Haskell
a051451 n = a051451_list !! (n-1) a051451_list = scanl1 lcm a000961_list -- Reinhard Zumkeller, Mar 01 2012
-
Mathematica
f[n_] := LCM @@ Range@ n; Union@ Array[f, 41] (* Robert G. Wilson v, Jul 11 2011 *) Join[{1},LCM@@Range[#]&/@Select[Range[50],PrimePowerQ]] (* Harvey P. Dale, Feb 06 2020 *)
-
PARI
do(lim)=my(v=primes(primepi(lim)), u=List([1])); forprime(p=2, sqrtint(lim\1), for(e=2, log(lim+.5)\log(p), listput(u, p^e))); v=vecsort(concat(v, Vec(u))); for(i=2,#v,v[i]=lcm(v[i],v[i-1])); v \\ Charles R Greathouse IV, Nov 20 2012
-
PARI
{lim=100; n=1; i=1; j=1; until(n==lim, until(a!=j, a=lcm(j,i+1); i++;); j=a; n++; print(n" "a););} \\ Mike Winkler, Sep 07 2013
-
PARI
x=1;for(i=1,100,if(omega(i)==1,x*=factor(i)[1,1])) \\ Florian Baur, Apr 11 2022
-
Python
from math import prod from sympy import primepi, integer_nthroot, integer_log, primerange def A051451(n): def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length()))) m, k = n, f(n) while m != k: m, k = k, f(k) return prod(p**integer_log(m, p)[0] for p in primerange(m+1)) # Chai Wah Wu, Aug 15 2024
-
Sage
def A051451_list(n): a = [ ] L = [1] for i in (1..n): a.append(i) if (is_prime_power(i) == 1): L.append(lcm(a)) return(L) A051451_list(42) # Jani Melik, Jul 07 2022
Formula
a(n) = A208768(n) + 1. - Reinhard Zumkeller, Mar 01 2012
Sum_{n>=1} 1/a(n) = A064890. - Amiram Eldar, Nov 16 2020
Extensions
Minor edits by Ray Chandler, Jan 16 2009
Comments