%I #13 Sep 24 2024 22:26:06
%S 0,1,0,1,0,-1,0,1,0,1,0,1,0,1,0,-1,0,-1,0,1,0,1,0,-1,0,1,0,1,0,1,0,1,
%T 0,1,0,1,0,1,0,1,0,-1,0,-1,0,-1,0,-1,0,1,0,-1,0,-1,0,1,0,1,0,-1,0,1,0,
%U 1,0,1,0,1,0,-1,0,-1,0,1,0,1,0,-1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,-1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0
%N Balanced ternary digital root of n.
%C a(A005843(n))=0; a(A134453(n))=-1; a(A134454(n))=1; abs(a(A005408(n)))=1;
%C abs(a(n)) = A000035(n).
%D D. E. Knuth, The Art of Computer Programming, Addison-Wesley, Reading, MA, Vol 2, pp 173-175.
%H R. Zumkeller, <a href="/A134452/b134452.txt">Table of n, a(n) for n = 0..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DigitalRoot.html">Digital Root</a>
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Balanced_ternary">Balanced Ternary</a>
%F a(n) = f(n) where f(n) = if n<-1 then f(-A065363(-n)) else (if n>1 then f(A065363(n)) else n).
%e 42 == '+---0' --> +1-1-2-1+0=-2 == '-+' --> -1+1=0;
%e 43 == '+---+' --> +1-1-2-1+1=-1;
%Y Cf. A065363, A134453, A134454, A005843, A005408, A000035.
%Y Cf. A134451.
%K sign,base
%O 0,1
%A _Reinhard Zumkeller_, Oct 27 2007