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

 

Logo

110 people attended OEIS-50 (videos, suggestions); annual fundraising drive to start soon (donate); editors, please edit! (stack is over 300), your editing is more valuable than any donation.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A037123 a(n) = a(n-1) + Sum of digits of n. 19
0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 46, 48, 51, 55, 60, 66, 73, 81, 90, 100, 102, 105, 109, 114, 120, 127, 135, 144, 154, 165, 168, 172, 177, 183, 190, 198, 207, 217, 228, 240, 244, 249, 255, 262, 270, 279, 289, 300, 312, 325, 330, 336, 343, 351, 360, 370, 381 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Sum of digits of A007908(n). - Franz Vrabec, Oct 22 2007

a(n) = A007953(A053064(n)). [Reinhard Zumkeller, Oct 10 2008]

Also digital sum of A138793(n) for n>0  - Bruno Berselli, May 27 2011

Sum of the digital sum of i for i from 0 to n. - N. J. A. Sloane, Nov 13 2013

REFERENCES

P.-H. Cheo; S.-C. Yien, A problem on the k-adic representation of positive integers. Acta Math. Sinica 5, 433-438 (1955).

Coquet, Jean; Power sums of digital sums. J. Number Theory 22 (1986), no. 2, 161-176.

H. Delange, Sur la fonction sommatoire de la fonction " somme des chiffres", Enseignement Math. (2) 21 (1975), 31-47.

Grabner, P. J.; Kirschenhofer, P.; Prodinger, H.; Tichy, R. F.; On the moments of the sum-of-digits function. Applications of Fibonacci numbers, Vol. 5 (St. Andrews, 1992), 263-271, Kluwer Acad. Publ., Dordrecht, 1993.

Mauclaire, J.-L.; Murata, Leo; On q-additive functions. I. Proc. Japan Acad. Ser. A Math. Sci. 59 (1983), no. 6, 274-276.

Mauclaire, J.-L.; Murata, Leo; On q-additive functions. II. Proc. Japan Acad. Ser. A Math. Sci. 59 (1983), no. 9, 441-444.

H. Riede, Asymptotic estimation of a sum of digits. Fibonacci Q. 36, No. 1, 72-75 (1998).

Trollope, J. R. An explicit expression for binary digital sums. Math. Mag. 41 1968 21-25.

LINKS

David A Corneth, Table of n, a(n) for n = 0..10008

FORMULA

a(n) = Sum_{k=0..n} s(k) = Sum_{k=0..n} A007953(k), where s(k) denote the sum of the digits of k in decimal representation. Asymptotic expression: a(n-1) = Sum_{k=0..n-1} s(k) = 4.5*n*log10(n) + O(n). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Sep 07 2002

a(n) = n*(n+1)/2 - 9*sum(k=1, n, sum(i=1, ceil(log(k)/log(10)), floor(k/10^i))) - Benoit Cloitre, Aug 28 2003

From Hieronymus Fischer, Jul 11 2007: (Start)

G.f. sum{k>0, (x^k-x^(k+10^k)-9x^(10^k))/(1-x^(10^k))}/(1-x)^2.

a(n) = (1/2)*((n+1)*(n-18*sum{k>0,floor(n/10^k)})+9*sum{k>0,(1+floor(n/10^k= ))*floor(n/10^k)*10^k}).

a(n) = (1/2)*((n+1)*(2*A007953(n)-n)+9*sum{k>0,(1+floor(n/10^k))*floor(n/10^= k)*10^k}). (End)

MAPLE

# From N. J. A. Sloane, Nov 13 2013:

digsum:=proc(n, B) local a; a := convert(n, base, B):

add(a[i], i=1..nops(a)): end;

f:=proc(n, k, B) global digsum; local i;

add( digsum(i, B)^k, i=0..n); end;

lprint([seq(digsum(n, 10), n=0..100)]); # A007953

lprint([seq(f(n, 1, 10), n=0..100)]); #A037123

lprint([seq(f(n, 2, 10), n=0..100)]); #A074784

lprint([seq(f(n, 3, 10), n=0..100)]); #A231688

lprint([seq(f(n, 4, 10), n=0..100)]); #A231689

PROG

(PARI) a(n)=n*(n+1)/2-9*sum(k=1, n, sum(i=1, ceil(log(k)/log(10)), floor(k/10^i)))

(PARI) a(n)={n++; my(t, i, s); c=n; while(c!=0, i++; c\=10); for(j=1, i, d=(n\10^(i-j))%10; t+=(10^(i-j)*(s*d+binomial(d, 2)+d*9*(i-j)/2)); s+=d); t} \\ David A. Corneth, Aug 16 2013

(Perl) for $i (0..100){ @j = split "", $i; for (@j){ $sum += $_; } print "$sum, "; } __END__ # gamo(AT)telecable.es

(MAGMA) [ n eq 0 select 0 else &+[&+Intseq(k): k in [0..n]]: n in [0..56] ];  // Bruno Berselli, May 27 2011

CROSSREFS

Cf. A004207, A016052, A131383, A131384, A131451.

Cf. also A074784, A231688, A231689.

Partial sums of A007953.

Sequence in context: A054632 A109453 A217627 * A062918 A113168 A071817

Adjacent sequences:  A037120 A037121 A037122 * A037124 A037125 A037126

KEYWORD

nonn,base,easy

AUTHOR

Vasiliy Danilov (danilovv(AT)usa.net) Jun 15 1998

EXTENSIONS

More terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Sep 07 2002

STATUS

approved

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

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

Last modified October 30 12:17 EDT 2014. Contains 248801 sequences.