cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A072830 Absolute value of 2*b(n)-9*n, where b(n) = accumulative sum of the greatest digit of n minus the least digit of n (A037904).

This page as a plain text file.
%I A072830 #10 May 21 2014 14:13:01
%S A072830 9,18,27,36,45,54,63,72,81,88,97,104,109,112,113,112,109,104,97,102,
%T A072830 109,118,125,130,133,134,133,130,125,128,133,140,149,156,161,164,165,
%U A072830 164,161,162,165,170,177,186,193,198,201,202,201,200,201,204,209,216
%N A072830 Absolute value of 2*b(n)-9*n, where b(n) = accumulative sum of the greatest digit of n minus the least digit of n (A037904).
%F A072830 Let b(n) = sum( A037904(k), {k=1..n}), a(n) = |2*b(n) - 9*n|.
%t A072830 f[n_] := Block[{d = IntegerDigits[n]}, Max[d] - Min[d]]; b[n_] := b[n] = b[n - 1] + f[n]; b[1] = 0; a[n_] := a[n] = Abs[2b[n] - 9*n]; Table[ a[n], {n, 1, 65}]
%t A072830 gdmld[n_]:=Module[{idn=IntegerDigits[n]},Max[idn]-Min[idn]]; Module[ {nn=60,gd}, gd=Accumulate[gdmld/@Range[nn]];Abs[ 2*Last[#]- 9*First[ #]]&/@Thread[{Range[nn],gd}]]
%Y A072830 Cf. A037904.
%K A072830 nonn,base
%O A072830 1,1
%A A072830 _Benoit Cloitre_ and _Robert G. Wilson v_, Aug 09 2002
%E A072830 Definition clarified by _Harvey P. Dale_, May 21 2014