login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A326300
Steinhaus sums.
0
2, 6, 8, 16, 18, 22, 24, 40, 42, 46, 48, 56, 58, 62, 64, 96, 98, 102, 104, 112, 114, 118, 120, 136, 138, 142, 144, 152, 154, 158, 160, 224, 226, 230, 232, 240, 242, 246, 248, 264, 266, 270, 272, 280, 282, 286, 288, 320, 322, 326, 328, 336, 338, 342, 344, 360, 362, 366, 368
OFFSET
1,1
LINKS
Sandor Csörgö, Gordon Simons, On Steinhaus' resolution of the St. Petersburg paradox, Probab. Math. Statist. 14 (1993), 157--172. MR1321758 (96b:60017). See p. 163 and Table 1 p. 171.
FORMULA
a(n) = Sum_{k>=1} floor(n/2^k + 1/2)*2^k.
a(n) = 2 * A006520(n-1).
PROG
(PARI) a(n) = sum(k=1, 1+log(n)\log(2), floor(n/2^k+1/2)*2^k);
(Python)
def a(n):
s = 0
for k in range(1, n.bit_length()+1):
s += ((n + (1 << (k-1))) >> k) << k
return s
print([a(n) for n in range(1, 60)]) # Darío Clavijo, Aug 24 2024
CROSSREFS
Cf. A000523 (log_2(n)), A006520.
Sequence in context: A336896 A306906 A174658 * A266074 A191822 A238549
KEYWORD
nonn
AUTHOR
Michel Marcus, Oct 17 2019
STATUS
approved