login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A037902
a(n)=(greatest base 8 digit of n)-(least base 8 digit of n).
0
0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 2, 1, 0, 1, 2, 3, 4, 5, 3, 2, 1, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0, 1, 2, 3, 5, 4, 3, 2, 1, 0, 1, 2, 6, 5, 4, 3, 2, 1, 0, 1, 7, 6, 5, 4, 3, 2, 1, 0, 1, 1, 2, 3, 4, 5, 6, 7, 1, 0, 1, 2, 3, 4, 5, 6, 2, 1, 1, 2, 3, 4, 5, 6, 3, 2, 2
OFFSET
1,11
MATHEMATICA
gb8lb8[n_]:=Module[{idn8=IntegerDigits[n, 8]}, Max[idn8]-Min[idn8]]; gb8lb8/@ Range[100] (* Harvey P. Dale, Nov 14 2014 *)
CROSSREFS
Sequence in context: A030106 A255592 A037894 * A037840 A165091 A192514
KEYWORD
nonn,base
STATUS
approved