login
A056839
Squarefree part of lcm(1,...,n).
1
1, 1, 2, 6, 3, 15, 15, 105, 210, 70, 70, 770, 770, 10010, 10010, 10010, 5005, 85085, 85085, 1616615, 1616615, 1616615, 1616615, 37182145, 37182145, 7436429, 7436429, 22309287, 22309287, 646969323, 646969323, 20056049013, 40112098026, 40112098026, 40112098026
OFFSET
0,3
LINKS
FORMULA
a(n) = A007913(A003418(n)) = lcm(1..n)/lcm(1..q)^2, where q = floor(sqrt(n)) = A000196(n).
EXAMPLE
n=65: lcm(1..65) = 1182266884102822267511361600, floor(sqrt(65))=8, lcm(1..8) = 8*3*5*7 = 840; a(65) = lcm(1..65)/lcm(1..8)^2 = 1675548305134385299761 is squarefree.
MAPLE
b:= proc(n) b(n):= `if`(n=0, 1, ilcm(b(n-1), n)) end:
a:= n-> mul(i[1]^irem(i[2], 2), i=ifactors(b(n))[2]):
seq(a(n), n=0..40); # Alois P. Heinz, Apr 01 2016
MATHEMATICA
{1}~Join~Array[Sqrt[#] /. (c_: 1) a_^(b_: 0) :> (c a^b)^2 &[LCM @@ Range@ #] &, 34] (* Michael De Vlieger, Oct 26 2017, after Bill Gosper at A007913 *)
PROG
(PARI) a(n) = core(lcm(vector(n, k, k))); \\ Michel Marcus, Oct 27 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 29 2000
EXTENSIONS
a(0)=1 inserted by Alois P. Heinz, Apr 01 2016
Edited by Jon E. Schoenfield, Jul 09 2018
STATUS
approved