login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A072817 Accumulative sum of the greatest digit of n minus the least digit of n (A037904) <= 10^n. 1
1, 286, 4621, 56980, 640663, 6904678, 72722233, 755339992, 7774461355, 79520082490, 809705785165, 8217213032524, 83178920046367, 840306174900622, 8475694265094817, 85380606857454976, 859192675118710099, 8638686211723117474, 86794540082486097589, 871513270875022245748 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Let b(n) = sum( A037904(k),{k=1..n}), then the lim b(n)/n -> 9. Reason, as the number of digits increases, then the likelihood of the maximum digit -> 9 and the minimum digits -> 0 becomes one.
LINKS
FORMULA
a(n) = 1 + Sum_{w=1..n} Sum_{k=1..9} (10-k)*k*((k+1)^w - 2*k^w + (k-1)^w) - k*((k+1)^(w-1) - k^(w-1)). - Andrew Howroyd, Jan 28 2020
MATHEMATICA
f[n_] := Block[{d = IntegerDigits[n]}, Max[d] - Min[d]]; s = 0; k = 0; Do[ While[k != 10^n, k++; s = s + f[k]]; Print[s], {n, 1, 8}]
PROG
(PARI) a(n)={1 + sum(w=1, n, sum(k=1, 9, (10-k)*k*((k+1)^w - 2*k^w + (k-1)^w) - k*((k+1)^(w-1) - k^(w-1))))} \\ Andrew Howroyd, Jan 28 2020
CROSSREFS
Cf. A037904.
Sequence in context: A235409 A238251 A027798 * A117994 A221431 A306144
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
a(9)-a(12) from Donovan Johnson, Apr 09 2010
Terms a(13) and beyond from Andrew Howroyd, Jan 28 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 07:57 EDT 2024. Contains 371905 sequences. (Running on oeis4.)