A249154 (n+1) times the number of 1's in the binary expansion of n.
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, 78, 81, 112, 87, 120, 124, 160, 33, 68, 70, 108, 74, 114, 117, 160, 82, 126, 129, 176, 135, 184, 188, 240, 98, 150, 153, 208, 159, 216, 220, 280, 171, 232, 236, 300, 244, 310, 315, 384, 65
Offset: 0
Links
Programs
-
Mathematica
A249154[n_] := (n + 1)*DigitCount[n, 2, 1]; Array[A249154, 100, 0] (* Paolo Xausa, Feb 11 2025 *)
-
PARI
a(n) = (n+1)*hammingweight(n); \\ Michel Marcus, Feb 11 2025
-
Python
def A249154(n): return (n+1)*n.bit_count() # Chai Wah Wu, Nov 11 2024
-
Scheme
(define (A249154 n) (* (+ n 1) (A000120 n)))