The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A245788 n times the number of 1's in the binary expansion of n. 6
 0, 1, 2, 6, 4, 10, 12, 21, 8, 18, 20, 33, 24, 39, 42, 60, 16, 34, 36, 57, 40, 63, 66, 92, 48, 75, 78, 108, 84, 116, 120, 155, 32, 66, 68, 105, 72, 111, 114, 156, 80, 123, 126, 172, 132, 180, 184, 235, 96, 147, 150, 204, 156, 212, 216, 275, 168, 228, 232, 295, 240 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS Jens Kruse Andersen, Table of n, a(n) for n = 0..1000 FORMULA a(2*n) = 2*a(n). a(2*n+1) = 2*n + 1 + (2+1/n)*a(n). - Robert Israel, Aug 01 2014 G.f.: x * (d/dx) (1/(1 - x))*Sum_{k>=0} x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Mar 27 2018 EXAMPLE G.f. = x + 2*x^2 + 6*x^3 + 4*x^4 + 10*x^5 + 12*x6 + 21*x^7 + 8*x^8 + 18*x^9 + ... MAPLE a:= n -> n * convert(convert(n, base, 2), `+`): seq(a(n), n=0..100); # Robert Israel, Aug 01 2014 MATHEMATICA Table[n*DigitCount[n, 2, 1], {n, 0, 100}] (* Harvey P. Dale, Dec 16 2014 *) PROG (PARI) sumbit(n) = my(r); while(n>0, r+=n%2; n\=2); r a(n) = n*sumbit(n) (Python) [n*bin(n)[2:].count('1') for n in range(1000)] # Chai Wah Wu, Aug 03 2014 (PARI) {a(n) = if( n<0, 0, n * sumdigits(n, 2))}; /* Michael Somos, Aug 05 2014 */ /* since version 2.6.0 */ CROSSREFS Cf. A000120 (number of 1's), A057147 (decimal version). Sequence in context: A264647 A094748 A245579 * A065879 A065880 A335063 Adjacent sequences:  A245785 A245786 A245787 * A245789 A245790 A245791 KEYWORD nonn,base AUTHOR Franklin T. Adams-Watters, Aug 01 2014 STATUS approved

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

Last modified June 22 20:35 EDT 2021. Contains 345389 sequences. (Running on oeis4.)