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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A295513 a(n) = n*bil(n) - 2^bil(n) where bil(0) = 0 and bil(n) = floor(log_2(n)) + 1 for n>0. 1
 -1, -1, 0, 2, 4, 7, 10, 13, 16, 20, 24, 28, 32, 36, 40, 44, 48, 53, 58, 63, 68, 73, 78, 83, 88, 93, 98, 103, 108, 113, 118, 123, 128, 134, 140, 146, 152, 158, 164, 170, 176, 182, 188, 194, 200, 206, 212, 218, 224, 230, 236, 242, 248, 254, 260, 266, 272, 278 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 LINKS Table of n, a(n) for n=0..57. Hsien-Kuei Hwang, S. Janson, and T.-H. Tsai, Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications, Preprint 2016. FORMULA A001855(n) = a(n) + 1. A033156(n) = a(n) + 2n. A003314(n) = a(n) + n. A083652(n) = a(n+1) + 2. A061168(n) = a(n+1) - n + 1. A123753(n) = a(n+1) + n + 2. A097383(n) = a(n+1) - div(n-1, 2). A054248(n) = a(n) + n + rem(n, 2). MAPLE A295513 := proc(n) local i, s, z; s := -1; i := n-1; z := 1; while 0 <= i do s := s+i; i := i-z; z := z+z od; s end: seq(A295513(n), n=0..57); MATHEMATICA a[n_] := n IntegerLength[n, 2] - 2^IntegerLength[n, 2]; Table[a[n], {n, 0, 58}] PROG (Python) def A295513(n): return n*(m:=(n-1).bit_length())-(1<

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.

Last modified September 22 03:20 EDT 2023. Contains 365503 sequences. (Running on oeis4.)