OFFSET
1,2
COMMENTS
When a(n)=2, A094404(n) is not 1.
MATHEMATICA
Kempner[1] := 1; Kempner[n_] := Max[Kempner @@@ FactorInteger[n]]; Kempner[p_, 1] := p; Kempner[p_, alpha_] := Kempner[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]]; L = M = {}; a = 2; Do[ s = Kempner[n]; If[s/n < a, a = s/n; AppendTo[M, a]; AppendTo[L, n]], {n, 2, 40320}], L/Denominator[M] (revised by Eric W. Weisstein, May 17 2004, and by N. J. A. Sloane, Jul 03 2017)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Sondow and Robert G. Wilson v, May 17 2004
STATUS
approved