OFFSET
1,2
FORMULA
a(n) = a(2k) is either n = 2k or n/2 = k. a(n) = n/2 seems regular, a(n) = n seems "anomalous".
EXAMPLE
n = 30: D = {1, 2, 3, 5, 6, 10, 15, 30}, dD = {1, 1, 2, 1, 4, 5, 15}={1, 2, 4, 5, 15}, lcm(dD) = 60, gcd(n, lcm(dD(n))) = gcd(30, 60) = 30 = n
n = 36: D = {1, 2, 3, 4, 6, 9, 12, 18, 36}, dD = {1, 1, 1, 2, 3, 3, 6, 18} = {1, 2, 3, 6, 18}, lcm(dD) = 18, gcd(n, lcm(dD(n))) = gcd(36, 18) = 18 = n/2.
MATHEMATICA
Table[GCD[2 n, LCM @@ Differences@ Divisors[2 n]], {n, 71}] (* Michael De Vlieger, Dec 20 2015 *)
PROG
(PARI) a(n) = my(d=divisors(2*n), dd = vector(#d-1, k, d[k+1] - d[k])); gcd(2*n, lcm(dd)); \\ Michel Marcus, Mar 22 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Apr 25 2001
STATUS
approved