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”).

A130252
Partial sums of A130250.
9
0, 1, 4, 7, 11, 15, 20, 25, 30, 35, 40, 45, 51, 57, 63, 69, 75, 81, 87, 93, 99, 105, 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 267, 275, 283, 291, 299, 307, 315, 323, 331, 339, 347, 355, 363, 371
OFFSET
0,3
COMMENTS
If the initial zero is omitted, partial sums of A130253.
LINKS
FORMULA
a(n) = Sum_{k=0..n} A130250(k).
a(n) = n*ceiling(log_2(3n-1)) - (1/2)*( A001045(ceiling(log_2(3n-1)) +1) - 1 ).
G.f.: (1/(1-x)^2)*Sum_{k>=0} x^A001045(k).
MATHEMATICA
A001045[n_]:= (2^n - (-1)^n)/3;
A130252[n_]:= If[n==0, 0, (2*n*Ceiling[Log[2, 3*n-1]] - A001045[Ceiling[Log[2, 3*n-1]]+1] +1)/2];
Table[A130252[n], {n, 0, 70}] (* G. C. Greubel, Mar 18 2023 *)
PROG
(Magma)
A001045:= func< n | (2^n - (-1)^n)/3 >;
A130252:= func< n | n eq 0 select 0 else (2*n*Ceiling(Log(2, 3*n-1)) - A001045(Ceiling(Log(2, 3*n-1)) +1) +1)/2 >;
[A130252(n): n in [0..70]]; // G. C. Greubel, Mar 18 2023
(SageMath)
def A001045(n): return (2^n - (-1)^n)/3
def A130252(n): return 0 if (n==0) else (2*n*ceil(log(3*n-1, 2)) - A001045(ceil(log(3*n-1, 2)) +1) +1)/2
[A130252(n) for n in range(71)] # G. C. Greubel, Mar 18 2023
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, May 20 2007
STATUS
approved