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 A369332 #17 Jan 29 2024 19:09:46 %S A369332 1,17,186,12234,605714,30143621,865062888,374978871766,92420578210888, %T A369332 22764626902276757,4227156427366610576,1076625258046594762034, %U A369332 196829039855755478065982,34737980525681450161565604,3519580168264415862502129296,8186117385516870986118141242073 %N A369332 a(n) is the sum of numbers whose binary forms can be constructed using some or all of the binary digits of 1..n. %e A369332 For a(3) = 186, the binary forms of n = 1, 2 and 3 are 1, 10 and 11. These together contain four 1's and one 0. The possible combinations to construct binary numbers of these are below with their equivalent decimal values: %e A369332 1 1 %e A369332 10 2 %e A369332 11 3 %e A369332 101 5 %e A369332 110 6 %e A369332 111 7 %e A369332 1011 11 %e A369332 1101 13 %e A369332 1110 14 %e A369332 1111 15 %e A369332 10111 23 %e A369332 11011 27 %e A369332 11101 29 %e A369332 11110 30 %e A369332 --- %e A369332 Total: 186 %o A369332 (PARI) a(n)={my(w=0,b=0); for(i=1, n, w+=hammingweight(i); b+=logint(i,2)+1); sum(j=0, w-1, sum(k=0, b-w, my(t=j+k);if(t, binomial(t,j)*(2^t + j*(2^t-1)/t), 1) ))} \\ _Andrew Howroyd_, Jan 20 2024 %Y A369332 Cf. A181132, A000788. %K A369332 nonn,base %O A369332 1,2 %A A369332 _Tamas Sandor Nagy_, Jan 20 2024 %E A369332 More terms from _Andrew Howroyd_, Jan 20 2024