OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..16382
FORMULA
MAPLE
b:= proc(n) option remember; `if`(n<0, 0,
b(n-1)+x^add(i, i=Bits[Split](n)))
end:
a:= n-> subs(x=n, b(n)):
seq(a(n), n=0..37);
PROG
(Python)
def A361257(n): return sum([n**j.bit_count() for j in range(0, n+1)])
print(list(A361257(n) for n in range(0, 37))) # Dumitru Damian, Mar 06 2023
(Python)
from collections import Counter
def A361257(n): return sum(j*n**i for i, j in Counter(j.bit_count() for j in range(n+1)).items()) # Chai Wah Wu, Mar 06 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz, Mar 06 2023
STATUS
approved