A130251 Partial sums of A130249.
0, 2, 4, 7, 10, 14, 18, 22, 26, 30, 34, 39, 44, 49, 54, 59, 64, 69, 74, 79, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 223, 230, 237, 244, 251, 258, 265, 272, 279, 286, 293, 300, 307, 314, 321
Offset: 0
Keywords
Examples
G.f. = 2*x + 4*x^2 + 7*x^3 + 10*x^4 + 14*x^5 + 18*x^6 + 22*x^7 + ... - _Michael Somos_, Sep 17 2018
Links
- G. C. Greubel, Table of n, a(n) for n = 0..2500
Crossrefs
Programs
-
Magma
[0] cat [(&+[Floor(Log(3*k+1)/Log(2)) : k in [1..n]]): n in [1..100]]; // G. C. Greubel, Sep 09 2018
-
Mathematica
Join[{0}, Table[Sum[Floor[Log[2, 3*k + 1]], {k, 1, n}], {n, 1, 2500}]] (* G. C. Greubel, Sep 09 2018 *)
-
PARI
for(n=0,100, print1(sum(k=1,n, floor(log(3*k+1)/log(2))), ", ")) \\ G. C. Greubel, Sep 09 2018
-
Python
def A130251(n): return (n+1)*((m:=(3*n+1).bit_length())-1)-(((1<
>1) # Chai Wah Wu, Apr 17 2025