login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123753 Partial sums of A070941. 11
1, 3, 6, 9, 13, 17, 21, 25, 30, 35, 40, 45, 50, 55, 60, 65, 71, 77, 83, 89, 95, 101, 107, 113, 119, 125, 131, 137, 143, 149, 155, 161, 168, 175, 182, 189, 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, 280, 287, 294, 301, 308, 315, 322, 329, 336, 343 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Hsien-Kuei Hwang, S. Janson and T.-H. Tsai, Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47.
FORMULA
a(n) = A003314(n+1)+1. - Reinhard Zumkeller, Oct 12 2006
Let bil(n) = floor(log_2(n)) + 1 for n>0, bil(0) = 0 and b(n) = n + n*bil(n) - 2^bil(n) + 1 then a(n) = b(n+1). (This suggests that '0' be prepended to this sequence.) - Peter Luschny, Dec 02 2017
MAPLE
A123753 := proc(n) local i, J, z; i := n+1: J := i; i := i-1; z := 1;
while 0 <= i do J := J+i; i := i-z; z := z+z od; J end:
seq(A123753(n), n=0..57); # Peter Luschny, Nov 30 2017
# Alternatively:
a := n -> (n+1)*(1 + ilog2(2*n+3)) - 2^ilog2(2*n+3) + 1:
seq(a(n), n=0..57); # Peter Luschny, Dec 02 2017
MATHEMATICA
a[n_] := (n + 1)(1 + IntegerLength[n + 1, 2]) - 2^IntegerLength[n + 1, 2] + 1;
Table[a[n], {n, 0, 57}] (* Peter Luschny, Dec 02 2017 *)
PROG
(Python)
def A123753(n):
s, i, z = n+1, n, 1
while 0 <= i: s += i; i -= z; z += z
return s
print([A123753(n) for n in range(0, 58)]) # Peter Luschny, Nov 30 2017
(Python)
def A123753(n): return (n+1)*(1+(m:=n.bit_length()))-(1<<m)+1 # Chai Wah Wu, Mar 29 2023
CROSSREFS
Sequence in context: A278449 A006590 A061781 * A124288 A256966 A280944
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 12 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)