OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = n^c(n) * ( Product_{d|n, d<n} d )^(1-c(n)), where c is the prime characteristic (A010051). - Wesley Ivan Hurt, Jan 10 2021
MATHEMATICA
a[1] = 1; a[n_ /; PrimeQ[n]] := n; a[n_] := Times @@ Most[Divisors[n]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, May 28 2015 *)
Table[If[CompositeQ[n], Times@@Most[Divisors[n]], n], {n, 60}] (* Harvey P. Dale, Jun 24 2016 *)
PROG
(Haskell)
a066729 n = if pds == [1] then n else product pds
where pds = a027751_row n
-- Reinhard Zumkeller, Jul 31 2014
(PARI) a(n) = my(pd = vecprod(divisors(n))); if (isprime(n), pd, pd/n); \\ Michel Marcus, Jan 09 2021
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Reinhard Zumkeller, Jan 15 2002
EXTENSIONS
Revised and data corrected by Reinhard Zumkeller, Jul 31 2014
STATUS
approved