login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A037904 Greatest digit of n - least digit of n. 12
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 9 (list; graph; refs; listen; history; internal format)
OFFSET

1,13

COMMENTS

Also a(n)=Sum{|d(i)-d(i-1)|: i=0,1,...,m}, where Sum{d(i)^10^i: i=0,1,...,m} is the base 10 representation of n.

Also a(n)=(1/2)*Sum{|d(i)-e(i)|} where Sum{d(i)*10^i} is the base 10 representation of n and e(i) are the digits d(i) in reverse order.

a(n) = A054055(n)-A054054(n); a(A010785(n)) = 0; for k>0: a(n) = a(n*10^k + A000030(n)) = a(n*10^k + A010879(n)) = a(n*10^k + A054054(n)) = a(n*10^k + A054055(n)) . - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Dec 14 2007; corrected by David Wasserman (dwasserm(AT)earthlink.net), May 21 2008

LINKS

R. Zumkeller, Table of n, a(n) for n = 1..10000

MATHEMATICA

f[n_] := Block[{d = IntegerDigits[n]}, Max[d] - Min[d]]; Table[ f[n], {n, 1, 15}]

CROSSREFS

Cf. A040163, A064834.

Sequence in context: A025482 A023125 A030108 * A070615 A040114 A064834

Adjacent sequences:  A037901 A037902 A037903 * A037905 A037906 A037907

KEYWORD

nonn,base,nice

AUTHOR

Clark Kimberling (ck6(AT)evansville.edu)

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 13 18:33 EST 2012. Contains 205535 sequences.