login
A361257
a(n) = Sum_{j=0..n} n^wt(j), where wt = A000120.
2
1, 2, 5, 16, 29, 66, 127, 512, 737, 1090, 1541, 3312, 4369, 7658, 12209, 65536, 83537, 105282, 130987, 167600, 203701, 254122, 313259, 649728, 766201, 912626, 1079027, 1778896, 2071469, 3081570, 4329151, 33554432, 39135425, 45436546, 52524221, 60511536
OFFSET
0,2
LINKS
FORMULA
a(n) = Sum_{j=0..n} n^wt(j), where wt = A000120.
a(n) = Sum_{k>=0} n^k * A360189(n,k).
a(n) mod 2 = A059841(n).
a(2^n-1) = 2^(n^2) = A002416(n).
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