This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A295513 #20 Mar 30 2023 02:01:06 %S A295513 -1,-1,0,2,4,7,10,13,16,20,24,28,32,36,40,44,48,53,58,63,68,73,78,83, %T A295513 88,93,98,103,108,113,118,123,128,134,140,146,152,158,164,170,176,182, %U A295513 188,194,200,206,212,218,224,230,236,242,248,254,260,266,272,278 %N A295513 a(n) = n*bil(n) - 2^bil(n) where bil(0) = 0 and bil(n) = floor(log_2(n)) + 1 for n>0. %H A295513 Hsien-Kuei Hwang, S. Janson, and T.-H. Tsai, <a href="http://140.109.74.92/hk/wp-content/files/2016/12/aat-hhrr-1.pdf">Exact and asymptotic solutions of the recurrence f(n) = f(floor(n/2)) + f(ceiling(n/2)) + g(n): theory and applications</a>, Preprint 2016. %F A295513 A001855(n) = a(n) + 1. %F A295513 A033156(n) = a(n) + 2n. %F A295513 A003314(n) = a(n) + n. %F A295513 A083652(n) = a(n+1) + 2. %F A295513 A061168(n) = a(n+1) - n + 1. %F A295513 A123753(n) = a(n+1) + n + 2. %F A295513 A097383(n) = a(n+1) - div(n-1, 2). %F A295513 A054248(n) = a(n) + n + rem(n, 2). %p A295513 A295513 := proc(n) local i, s, z; s := -1; i := n-1; z := 1; %p A295513 while 0 <= i do s := s+i; i := i-z; z := z+z od; s end: %p A295513 seq(A295513(n), n=0..57); %t A295513 a[n_] := n IntegerLength[n, 2] - 2^IntegerLength[n, 2]; %t A295513 Table[a[n], {n, 0, 58}] %o A295513 (Python) %o A295513 def A295513(n): return n*(m:=(n-1).bit_length())-(1<<m) if n else -1 # _Chai Wah Wu_, Mar 29 2023 %Y A295513 Cf. A001855, A003314, A033156, A054248, A061168, A083652, A097383, A123753, A295508. %K A295513 sign %O A295513 0,4 %A A295513 _Peter Luschny_, Dec 02 2017