login
a(n) = floor(log_2(3n)).
4

%I #16 Feb 18 2024 01:35:11

%S 1,2,3,3,3,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,

%T 6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,

%U 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8

%N a(n) = floor(log_2(3n)).

%C Length of the symmetric signed digit expansion of n with q=2 (i.e., the length of the representation of n in the (-1,0,1)_2 number system).

%C n occurs A001045(n) times. - _Amiram Eldar_, Feb 18 2024

%H C. Heuberger and H. Prodinger, <a href="http://dx.doi.org/10.1007/s006070170021">On minimal expansions in redundant number systems: Algorithms and quantitative analysis</a>, Computing 66(2001), 377-393.

%F a(n) = A000523(A008585(n)). - _Reinhard Zumkeller_, Mar 16 2013

%F Sum_{n>=1} (-1)^(n+1)/a(n) = log(2) (A002162). - _Amiram Eldar_, Feb 18 2024

%t Floor[Log[2,3*Range[100]]] (* _Harvey P. Dale_, Oct 15 2016 *)

%o (Haskell)

%o a085423 = a000523 . a008585 -- _Reinhard Zumkeller_, Mar 16 2013

%Y Cf. A005578, A001045.

%Y Cf. A000523, A008585, A002162.

%K nonn,easy

%O 1,2

%A _Ralf Stephan_, Jun 30 2003