The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A079073 Sum of numbers < n having in binary representation the same number of 1's as n. 3
0, 0, 1, 0, 3, 3, 8, 0, 7, 14, 23, 7, 33, 18, 31, 0, 15, 45, 62, 45, 80, 64, 85, 15, 100, 107, 132, 38, 158, 65, 94, 0, 31, 124, 157, 186, 191, 221, 258, 124, 227, 296, 337, 163, 379, 206, 251, 31, 267, 423, 472, 297, 522, 348, 401, 78, 574, 455, 512, 133, 570, 192, 253, 0, 63 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
MAPLE
f:= n-> add(i, i=convert(n, base, 2)):
b:= proc(n) b(n):= b(n-1)+n*x^f(n) end: b(-1):=0:
a:= n-> coeff(b(n-1), x, f(n)):
seq(a(n), n=0..150); # Alois P. Heinz, Feb 08 2018
MATHEMATICA
a[n_] := Module[{dc = DigitCount[n, 2, 1]}, Select[Range[n-1], DigitCount[#, 2, 1] == dc&] // Total];
a /@ Range[0, 100] (* Jean-François Alcover, Nov 07 2020 *)
PROG
(PARI) a(n) = my(s=hammingweight(n)); sum(k=1, n-1, if (s==hammingweight(k), k)); \\ Michel Marcus, Nov 07 2020
CROSSREFS
Sequence in context: A349425 A248859 A171543 * A165507 A212636 A282255
KEYWORD
nonn,look,base
AUTHOR
Reinhard Zumkeller, Dec 21 2002
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 May 25 15:04 EDT 2024. Contains 372791 sequences. (Running on oeis4.)