OFFSET
1,2
MATHEMATICA
Smarandache[1] := 1; Smarandache[n_] := Max[Smarandache @@@ FactorInteger[n]]; Smarandache[p_, 1] := p; Smarandache[p_, alpha_] := Smarandache[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]]; Do[If[Smarandache[n] == DivisorSigma[0, n], Print[n]], {n, 1, 100000}] (* Ryan Propper, Jul 12 2005 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jason Earls, Aug 22 2002
EXTENSIONS
More terms from Ryan Propper, Jul 12 2005
More terms from Amiram Eldar, Feb 18 2019
STATUS
approved