OFFSET
1,20
LINKS
FORMULA
a(n) = n mod A227153(n).
MATHEMATICA
a[n_] := Module[{k = n, m = 2, r, p = 1}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, If[r > 0, p *= r]; m++]; Mod[n, p]]; Array[a, 100] (* Amiram Eldar, Feb 21 2024 *)
PROG
(Python)
from operator import mul
from functools import reduce
def a007623(n, p=2): return n if n<p else a007623(n//p, p+1)*10 + n%p
def a(n):
x=str(a007623(n)).replace('0', '')
return n%reduce(mul, map(int, x))
print([a(n) for n in range(1, 201)]) # Indranil Ghosh, Jun 21 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jun 18 2017
STATUS
approved