|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Stolarsky (1977) has an extensive bibliography.
|
|
LINKS
|
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.
|
|
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
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|