OFFSET
1,8
LINKS
J. Sondow and E. W. Weisstein, MathWorld: Smarandache Function
EXAMPLE
1, 1/2, 1/3, 1/4, 1/6, 1/8, 1/12, 3/40, 1/15, 1/16, ...
MATHEMATICA
A002034[1] := 1; A002034[n_] := Max[A002034 @@@ FactorInteger[n]]; A002034[p_, 1] := p; A002034[p_, alpha_] := A002034[p, alpha] = Module[{a, k, r, i, nu, k0 = alpha(p - 1)}, i = nu = Floor[Log[p, 1 + k0]]; a[1] = 1; a[n_] := (p^n - 1)/(p - 1); k[nu] = Quotient[alpha, a[nu]]; r[nu] = alpha - k[nu]a[nu]; While[r[i] > 0, k[i - 1] = Quotient[r[i], a[i - 1]]; r[i - 1] = r[i] - k[i - 1]a[i - 1]; i-- ]; k0 + Plus @@ k /@ Range[i, nu]]; M = {}; a = 2; Do[ s = A002034[n]; If[s/n < a, a = s/n; AppendTo[M, a]]], {n, 40320}]; Numerator[M] (* Jonathan Sondow, Apr 28 2004, revised by Eric W. Weisstein, May 17 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric W. Weisstein, Apr 29 2004
STATUS
approved