OFFSET
1,4
COMMENTS
This sequence is very probably multiplicative. - Mitch Harris, Apr 19 2005
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
Victor Ufnarovski and Bo Ahlander, How to Differentiate a Number, J. Integer Seqs., Vol. 6, 2003, #03.3.4.
FORMULA
a(n) = GCD(n, A003415(n)).
Multiplicative with a(p^e) = p^e if p divides e; a(p^e) = p^(e-1) otherwise. - Eric M. Schmidt, Oct 22 2013
From Antti Karttunen, Feb 28 2021: (Start)
MATHEMATICA
d[0] = d[1] = 0; d[n_] := d[n] = n*Total[Apply[#2/#1 &, FactorInteger[n], {1}]]; a[n_] := GCD[n, d[n]]; Table[a[n], {n, 1, 96}] (* Jean-François Alcover, Feb 21 2014 *)
f[p_, e_] := p^If[Divisible[e, p], e, e - 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 31 2023 *)
PROG
(Haskell)
a085731 n = gcd n $ a003415 n -- Reinhard Zumkeller, May 10 2011
(PARI) a(n) = {my(f = factor(n)); for (i=1, #f~, if (f[i, 2] % f[i, 1], f[i, 2]--); ); factorback(f); } \\ Michel Marcus, Feb 14 2016
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Reinhard Zumkeller, Jul 20 2003
STATUS
approved