OFFSET
1,2
COMMENTS
It seems that n/(2n-a(n)) is an integer for infinitely many values of n, see A082396.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..16383
FORMULA
Limit_{n->oo} a(n)/n = 2. Is (2-a(n)/n)*sqrt(n)*log(n) bounded?
MAPLE
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:
A082851 := proc(n) add( A082850(i), i=1..n) ; end proc: seq(A082851(n), n=1..100) ; # R. J. Mathar, Nov 17 2009
MATHEMATICA
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]]]];
Table[A082850[n], {n, 1, 68}] // Accumulate (* Jean-François Alcover, Dec 21 2023, after R. J. Mathar *)
Accumulate[Fold[Join[#, #, {#2}] &, {}, Range[7]]] (* Paolo Xausa, Jan 30 2025 *)
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Benoit Cloitre, Apr 14 2003
EXTENSIONS
Minor edits by R. J. Mathar, Nov 17 2009
STATUS
approved