STATUS
reviewed
approved
reviewed
approved
proposed
reviewed
editing
proposed
a[n_] := Module[{k = n, m = 2, rmin = n, r}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, If[0 < r < rmin, rmin = r]; m++]; rmin]; Array[a, 100, 0] (* Amiram Eldar, Jan 23 2024 *)
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed
def A(n, p=2):
def A(n, p=2): return n if n<p else A(int(n//p), , p+1)*10 + n%p
def a(n):
def a(n): return 0 if n==0 else min([int(i) for i in str(A(n)) if i !='0'])
print ([a(n) for n in range(201)] ) # Indranil Ghosh, Jun 19 2017
approved
editing
print [a(n) for n in xrangerange(201)] # Indranil Ghosh, Jun 19 2017
proposed
approved