login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A059095 List consisting of the representation of n in base 3 using -1,0,1 for n=1,2,3,4,... 2
1, 1, -1, 1, 0, 1, 1, 1, -1, -1, 1, -1, 0, 1, -1, 1, 1, 0, -1, 1, 0, 0, 1, 0, 1, 1, 1, -1, 1, 1, 0, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, 0, 1, -1, -1, 1, 1, -1, 0, -1, 1, -1, 0, 0, 1, -1, 0, 1, 1, -1, 1, -1, 1, -1, 1, 0, 1, -1, 1, 1, 1, 0, -1, -1, 1, 0, -1, 0, 1, 0, -1, 1, 1, 0, 0, -1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, -1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, -1, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Every natural number n has a unique representation as n = sum i=1 ... k e(i)*(3^i) for some k where e(i) is one of -1,0,1. Example: 25 = 27-3+1= 1*3^3+0*3^2+(-1)*3^1+1*3^0 so its representation is 1,0,-1,1. So by writing n in this base 3 representation and juxtaposing we get the sequence: (1),(1,-1),(1,0),(1,1),(1,-1,-1),...

REFERENCES

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

LINKS

Table of n, a(n) for n=0..109.

Wikipedia, Balanced Ternary

FORMULA

n = Sum(a(A134421(n)-2-k)*3^k: 0 <= k < A134021(n)), for n>0. - Reinhard Zumkeller, Oct 25 2007

CROSSREFS

A003137.

Sequence in context: A071027 A099990 A089939 * A187944 A105597 A188470

Adjacent sequences:  A059092 A059093 A059094 * A059096 A059097 A059098

KEYWORD

tabf,sign

AUTHOR

Avi Peretz (njk(AT)netvision.net.il), Feb 13 2001

EXTENSIONS

More terms from Larry Reeves (larryr(AT)acm.org), Jul 20 2001

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 20 19:23 EDT 2019. Contains 321349 sequences. (Running on oeis4.)