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 A082851 #20 Jan 30 2025 08:24:46 %S A082851 1,2,4,5,6,8,11,12,13,15,16,17,19,22,26,27,28,30,31,32,34,37,38,39,41, %T A082851 42,43,45,48,52,57,58,59,61,62,63,65,68,69,70,72,73,74,76,79,83,84,85, %U A082851 87,88,89,91,94,95,96,98,99,100,102,105,109,114,120,121,122,124,125,126 %N A082851 Partial sums of A082850. %C A082851 It seems that n/(2n-a(n)) is an integer for infinitely many values of n, see A082396. %H A082851 Paolo Xausa, <a href="/A082851/b082851.txt">Table of n, a(n) for n = 1..16383</a> %F A082851 Limit_{n->oo} a(n)/n = 2. Is (2-a(n)/n)*sqrt(n)*log(n) bounded? %p A082851 A082850 := proc(n) option remember ; local m ; if n <= 3 then op(n,[1,1,2]) ; else m := ilog2(n+1) ; if n = 2^m -1 then m; else m := ilog2(n) ; return procname(n+1-2^m) ; end if ; end if; end proc: %p A082851 A082851 := proc(n) add( A082850(i),i=1..n) ; end proc: seq(A082851(n),n=1..100) ; # _R. J. Mathar_, Nov 17 2009 %t A082851 A082850[n_] := A082850[n] = Module[{m}, If[n <= 3, {1, 1, 2}[[n]], m = Floor@Log2[n + 1]; If[n == 2^m - 1, m, m = Floor@Log2[n]; Return @ A082850[n + 1 - 2^m]]]]; %t A082851 Table[A082850[n], {n, 1, 68}] // Accumulate (* _Jean-François Alcover_, Dec 21 2023, after _R. J. Mathar_ *) %t A082851 Accumulate[Fold[Join[#, #, {#2}] &, {}, Range[7]]] (* _Paolo Xausa_, Jan 30 2025 *) %Y A082851 Cf. A082850, A082396. %K A082851 nonn,easy %O A082851 1,2 %A A082851 _Benoit Cloitre_, Apr 14 2003 %E A082851 Minor edits by _R. J. Mathar_, Nov 17 2009