OFFSET
1,4
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(n) local F, F2, m, i;
F:= sort(ifactors(n)[2], (i, j) -> i[1]<j[1]);
F2:= ListTools:-PartialSums(map2(op, 2, F));
for i from 1 do
if 2*F2[i]>=F2[-1] then return n/F[i][1] fi
od
end proc:
1, seq(f(n), n=2..100); # Robert Israel, Jan 26 2018
MATHEMATICA
mpf[n_] := Module[{fi = FactorInteger[n], ff, Om}, ff = Flatten[Table[ Table[f[[1]], {f[[2]]}], {f, fi}]]; Om = Length[ff]; If[OddQ[Om], ff[[Floor[Om/2]+1]], ff[[Om/2]]]];
a[n_] := n/mpf[n];
Array[a, 100] (* Jean-François Alcover, Mar 09 2019 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Jan 13 2003
STATUS
approved