This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A249154 #18 Feb 11 2025 05:36:29 %S A249154 0,2,3,8,5,12,14,24,9,20,22,36,26,42,45,64,17,36,38,60,42,66,69,96,50, %T A249154 78,81,112,87,120,124,160,33,68,70,108,74,114,117,160,82,126,129,176, %U A249154 135,184,188,240,98,150,153,208,159,216,220,280,171,232,236,300,244,310,315,384,65 %N A249154 (n+1) times the number of 1's in the binary expansion of n. %H A249154 Antti Karttunen, <a href="/A249154/b249154.txt">Table of n, a(n) for n = 0..8192</a> %H A249154 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A249154 a(n) = (n+1) * A000120(n). %F A249154 a(n) = A000120(n) + A245788(n). %F A249154 a(n) = 2*A000788(n) - A187059(n). %t A249154 A249154[n_] := (n + 1)*DigitCount[n, 2, 1]; Array[A249154, 100, 0] (* _Paolo Xausa_, Feb 11 2025 *) %o A249154 (Scheme) (define (A249154 n) (* (+ n 1) (A000120 n))) %o A249154 (Python) %o A249154 def A249154(n): return (n+1)*n.bit_count() # _Chai Wah Wu_, Nov 11 2024 %o A249154 (PARI) a(n) = (n+1)*hammingweight(n); \\ _Michel Marcus_, Feb 11 2025 %Y A249154 Cf. A000120, A000788, A187059, A245788, A091512. %K A249154 nonn,base %O A249154 0,2 %A A249154 _Antti Karttunen_, Nov 02 2014