OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = lcm(n, A038610(n)).
EXAMPLE
For n = 10: related terms = {1,2,5,10,3,7,9}; lcm(10,1,3,7,9) = 630 = a(10).
MATHEMATICA
a[n_] := LCM @@ Join[{n}, Select[Range[n], CoprimeQ[n, #] &]]; Array[a, 30] (* Amiram Eldar, Jun 20 2024 *)
PROG
(PARI) a(n)=my(t=lcm([1..n])/n, g); while((g=gcd(t, n))>1, t/=g); t*n \\ Charles R Greathouse IV, Nov 14 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 13 2003
STATUS
approved