OFFSET
0,3
COMMENTS
If the initial zero is omitted, partial sums of A130253.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
FORMULA
MATHEMATICA
A001045[n_]:= (2^n - (-1)^n)/3;
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, May 20 2007
STATUS
approved