login
A037903
a(n)=(greatest base 9 digit of n)-(least base 9 digit of n).
0
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 2, 1, 0, 1, 2, 3, 4, 5, 6, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 6, 5, 4, 3, 2, 1, 0, 1, 2, 7, 6, 5, 4, 3, 2, 1, 0, 1, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 1, 2, 3, 4, 5, 6, 7, 8, 1
OFFSET
1,12
MATHEMATICA
bnd[n_]:=Module[{idn9=IntegerDigits[n, 9]}, Max[idn9]-Min[idn9]]; Array[bnd, 100] (* Harvey P. Dale, Jul 12 2011 *)
CROSSREFS
Sequence in context: A030107 A255593 A037895 * A037841 A165111 A038387
KEYWORD
nonn,base
STATUS
approved