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 A326300 #13 Aug 24 2024 00:13:34 %S A326300 2,6,8,16,18,22,24,40,42,46,48,56,58,62,64,96,98,102,104,112,114,118, %T A326300 120,136,138,142,144,152,154,158,160,224,226,230,232,240,242,246,248, %U A326300 264,266,270,272,280,282,286,288,320,322,326,328,336,338,342,344,360,362,366,368 %N A326300 Steinhaus sums. %H A326300 Sandor Csörgö, Gordon Simons, <a href="http://www.math.uni.wroc.pl/~pms/files/14.2/Abstract/14.2.1.abs.pdf">On Steinhaus' resolution of the St. Petersburg paradox</a>, Probab. Math. Statist. 14 (1993), 157--172. MR1321758 (96b:60017). See p. 163 and Table 1 p. 171. %F A326300 a(n) = Sum_{k>=1} floor(n/2^k + 1/2)*2^k. %F A326300 a(n) = 2 * A006520(n-1). %o A326300 (PARI) a(n) = sum(k=1, 1+log(n)\log(2), floor(n/2^k+1/2)*2^k); %o A326300 (Python) %o A326300 def a(n): %o A326300 s = 0 %o A326300 for k in range(1,n.bit_length()+1): %o A326300 s += ((n + (1 << (k-1))) >> k) << k %o A326300 return s %o A326300 print([a(n) for n in range(1,60)]) # _Darío Clavijo_, Aug 24 2024 %Y A326300 Cf. A000523 (log_2(n)), A006520. %K A326300 nonn %O A326300 1,1 %A A326300 _Michel Marcus_, Oct 17 2019