OFFSET
0,13
COMMENTS
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..1000
EXAMPLE
a(12)=9 since 21/12 = 1 with remainder 9.
MATHEMATICA
l := {} For[i = 1, i < 100, i++, x := FromDigits[Reverse[IntegerDigits[i]]]; If[x >= i, AppendTo[l, Mod[x, i]], AppendTo[l, Mod[i, x]]]] l (* Jake Foster, Jun 05 2008 *)
rln[n_]:=Module[{r=IntegerReverse[n]}, If[r>n, Mod[r, n], Mod[n, r]]]; Join[ {0}, Array[rln, 90]] (* The program uses the IntegerReverse function from Mathematica version 10 *) (* Harvey P. Dale, Apr 03 2016 *)
PROG
(PARI) { for (n=0, 1000, x=n; r=0; while (x>0, d=x-10*(x\10); x\=10; r=r*10 + d); p=max(n, r); q=min(n, r); write("b061467.txt", n, " ", p%q) ) } \\ Harry J. Smith, Jul 23 2009
(Haskell)
a061467 0 = 0
a061467 n = mod (max n n') (min n n') where n' = a004086 n
-- Reinhard Zumkeller, Dec 31 2013
CROSSREFS
KEYWORD
base,easy,nice,nonn
AUTHOR
Erich Friedman, Jun 16 2001
STATUS
approved