|
Search: id:A059095
|
|
|
| A059095 |
|
List consisting of the representation of n in base 3 using -1,0,1 for n=1,2,3,4,... |
|
+0 3
|
|
| 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; listen)
|
|
|
OFFSET
|
0,1
|
|
|
COMMENT
|
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
|
Wikipedia, Balanced Ternary
|
|
FORMULA
|
n = Sum(a(A134421(n)-2-k)*3^k: 0<=k<A134021(n)), for n>0. - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Oct 25 2007
|
|
CROSSREFS
|
A003137.
Sequence in context: A106465 A099990 A089939 this_sequence A105597 A153490 A014194
Adjacent sequences: A059092 A059093 A059094 this_sequence 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
|
|
|
Search completed in 0.002 seconds
|