OFFSET
0,3
COMMENTS
a(n) = Sum_{i=0..n} digsum(i)^2, where digsum(i) = A007953(i). - N. J. A. Sloane, Nov 13 2013
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000 (terms 1..990 from Indranil Ghosh)
Tom C. Brown, Powers of Digital Sums, The Fibonacci Quarterly, Vol. 32, No. 3 (1994), pp. 207-210.
Jean Coquet, Power sums of digital sums, J. Number Theory, Vol. 22, No. 2 (1986), pp. 161-176.
P. J. Grabner, P. Kirschenhofer, H. Prodinger and R. F. Tichy, On the moments of the sum-of-digits function, PDF, Applications of Fibonacci numbers, Vol. 5 (St. Andrews, 1992), Kluwer Acad. Publ., Dordrecht, 1993, pp. 263-271; alternative link.
Robert E. Kennedy and Curtis N. Cooper, An extension of a theorem by Cheo and Yien concerning digital sums, Fibonacci Quarterly, Vol. 29, No. 2 (1991), pp. 145-149.
J.-L. Mauclaire and Leo Murata, On q-additive functions. I, Proc. Japan Acad. Ser. A Math. Sci., Vol. 59, No. 6 (1983), pp. 274-276.
J.-L. Mauclaire and Leo Murata, On q-additive functions. II, Proc. Japan Acad. Ser. A Math. Sci., Vol. 59, No. 9 (1983), pp. 441-444.
Harald Riede, Asymptotic estimation of a sum of digits, Fibonacci Quarterly, Vol. 36, No. 1 (1998), pp. 72-75.
J. R. Trollope, An explicit expression for binary digital sums, Math. Mag., Vol. 41, No. 1 (1968), pp. 21-25.
FORMULA
a(n) = Sum_{k=1..n} s(k)^2 = Sum_{k=1..n} A007953(k)^2, where s(k) denotes the sum of the digits of k in decimal representation.
Asymptotic expression: a(n-1) = Sum_{k=1..n-1} s(k)^2 = 20.25*n*log_10(n)^2 + O(n*log_10(n)).
In general: Sum_{k=1..n-1} s(k)^m = n*((9/2)*log_10(n))^m + O(n*log_10(n)^(m-1)).
MAPLE
See A037123.
MATHEMATICA
Accumulate @ Array[(Plus @@ IntegerDigits[#])^2 &, 50] (* Amiram Eldar, Jan 20 2022 *)
PROG
(Magma) [n eq 1 select n else Self(n-1)+(&+Intseq(n))^2: n in [1..48]]; // Bruno Berselli, Jul 12 2011
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Sep 07 2002
EXTENSIONS
Offset changed to 0 and a(0) prepended by Amiram Eldar, Jan 20 2022
STATUS
approved