login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A213359 A328000 A323006 * A139022 A196025 A174988
KEYWORD
nonn,base
AUTHOR
Alois P. Heinz, Mar 06 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 27 05:51 EDT 2024. Contains 372009 sequences. (Running on oeis4.)