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!)
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
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<<m) if n else -1 # Chai Wah Wu, Mar 29 2023
CROSSREFS
Sequence in context: A226596 A135678 A001195 * A194228 A194236 A127762
KEYWORD
sign
AUTHOR
Peter Luschny, Dec 02 2017
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 16 17:36 EDT 2024. Contains 371749 sequences. (Running on oeis4.)