cp's OEIS Frontend

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.

A134452 Balanced ternary digital root of n.

Original entry on oeis.org

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, 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, 1, 0, 1, 0, 1, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 27 2007

Keywords

Comments

a(A005843(n))=0; a(A134453(n))=-1; a(A134454(n))=1; abs(a(A005408(n)))=1;
abs(a(n)) = A000035(n).

Examples

			42 == '+---0' --> +1-1-2-1+0=-2 == '-+' --> -1+1=0;
43 == '+---+' --> +1-1-2-1+1=-1;
		

References

  • D. E. Knuth, The Art of Computer Programming, Addison-Wesley, Reading, MA, Vol 2, pp 173-175.

Crossrefs

Formula

a(n) = f(n) where f(n) = if n<-1 then f(-A065363(-n)) else (if n>1 then f(A065363(n)) else n).