login
A231500
a(n) = Sum_{i=0..n} wt(i)^2, where wt(i) = A000120(i).
4
0, 1, 2, 6, 7, 11, 15, 24, 25, 29, 33, 42, 46, 55, 64, 80, 81, 85, 89, 98, 102, 111, 120, 136, 140, 149, 158, 174, 183, 199, 215, 240, 241, 245, 249, 258, 262, 271, 280, 296, 300, 309, 318, 334, 343, 359, 375, 400, 404, 413, 422, 438, 447, 463, 479, 504, 513, 529, 545, 570, 586, 611, 636, 672, 673, 677, 681, 690, 694
OFFSET
0,3
COMMENTS
Stolarsky (1977) has an extensive bibliography.
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000 (terms 0..1024 from Ivan Neretin)
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.
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.
Kenneth B. Stolarsky, Power and exponential sums of digital sums related to binomial coefficient parity, SIAM J. Appl. Math., Vol. 32, No. 4 (1977), pp. 717-730.
J. R. Trollope, An explicit expression for binary digital sums, Math. Mag., Vol. 41, No. 1 (1968), pp. 21-25.
FORMULA
Stolarsky (1977) studies the asymptotics.
a(n) ~ n * (log(n)/(2*log(2)))^2 + O(n*log(n)) (Stolarsky, 1977). - Amiram Eldar, Jan 20 2022
a(n) = Sum_{k=0..floor(log_2(n+1))} k^2 * A360189(n,k). - Alois P. Heinz, Mar 06 2023
MAPLE
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;
[seq(f(n, 1, 2), n=0..100)]; #A000788
[seq(f(n, 2, 2), n=0..100)]; #A231500
[seq(f(n, 3, 2), n=0..100)]; #A231501
[seq(f(n, 4, 2), n=0..100)]; #A231502
MATHEMATICA
FoldList[#1 + DigitCount[#2, 2, 1]^2 &, 0, Range[1, 68]] (* Ivan Neretin, May 21 2015 *)
PROG
(PARI) a(n) = sum(i=0, n, hammingweight(i)^2); \\ Michel Marcus, Sep 20 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Nov 12 2013
STATUS
approved