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 A033156 #55 Mar 30 2023 01:49:41 %S A033156 1,4,8,12,17,22,27,32,38,44,50,56,62,68,74,80,87,94,101,108,115,122, %T A033156 129,136,143,150,157,164,171,178,185,192,200,208,216,224,232,240,248, %U A033156 256,264,272,280,288,296,304,312,320,328,336,344,352,360,368,376,384,392,400,408 %N A033156 a(1) = 1; for m >= 2, a(n) = a(n-1) + floor(a(n-1)/(n-1)) + 2. %H A033156 Harvey P. Dale, <a href="/A033156/b033156.txt">Table of n, a(n) for n = 1..1000</a> %H A033156 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. %H A033156 Hsien-Kuei Hwang, S. Janson, and T.-H. Tsai, <a href="https://doi.org/10.1145/3127585">Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications</a>, ACM Transactions on Algorithms, 13:4 (2017), #47; DOI: 10.1145/3127585. %H A033156 Haomin Li, <a href="http://hdl.handle.net/10012/18991">Computing a Basis for an Integer Lattice</a>, Master's Thesis, Univ. of Waterloo (Ontario, Canada 2022). %H A033156 M. A. Nyblom, <a href="http://www.jstor.org/stable/2695446">Some curious sequences involving floor and ceiling functions</a>, Am. Math. Monthly 109 (#6, 200), 559-564, Th. 3.1. %H A033156 Ralf Stephan, <a href="/somedcgf.html">Some divide-and-conquer sequences ...</a> %H A033156 Ralf Stephan, <a href="/A079944/a079944.ps">Table of generating functions</a> %F A033156 a(n) = n*(floor(log_2 n) + 3) - 2^((floor (log_2 n)) + 1). %F A033156 a(n) = n + a(floor(n/2)) + a(ceiling(n/2)) = n + min{a(k) + a(n-k):0 < k < n} = n + A003314(n). - _Henry Bottomley_, Jul 03 2002 %F A033156 A001855(n) + 2n-1. a(n) = b(n)+1 with b(0)=0, b(2n) = b(n) + b(n-1) + 2n + 2, b(2n+1) = 2b(n) + 2n + 3. - _Ralf Stephan_, Oct 24 2003 %F A033156 a(n) = A123753(n-1) + n - 1. - _Peter Luschny_, Nov 30 2017 %p A033156 A033156 := proc(n) option remember; if n=1 then 1 else A033156(n-1)+floor(A033156(n-1)/(n-1))+2; fi; end; %t A033156 a[n_] := n (2 + IntegerLength[n, 2]) - 2^IntegerLength[n, 2]; %t A033156 Table[a[n], {n, 1, 59}] (* _Peter Luschny_, Dec 02 2017 *) %t A033156 nxt[{n_,a_}]:={n+1,a+Floor[a/n]+2}; NestList[nxt,{1,1},60][[All,2]] (* _Harvey P. Dale_, Nov 03 2020 *) %o A033156 (Python) %o A033156 def A033156(n): %o A033156 s, i, z = 2*n-1, n-1, 1 %o A033156 while 0 <= i: s += i; i -= z; z += z %o A033156 return s %o A033156 print([A033156(n) for n in range(1, 60)]) # _Peter Luschny_, Nov 30 2017 %o A033156 (Python) %o A033156 def A033156(n): return n*(2+(m:=(n-1).bit_length()))-(1<<m) # _Chai Wah Wu_, Mar 29 2023 %Y A033156 Cf. A123753. %K A033156 nonn %O A033156 1,2 %A A033156 _N. J. A. Sloane_, Jun 05 2002