Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A134021
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A134021 Length of n in balanced ternary representation. +0
11
1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 (list; graph; listen)
OFFSET

0,3

COMMENT

a(n) = A134022(n) + A134023(n) + A134024(n);

0 <= a(n) - A081604(n) <= 1;

a(A134025(n))=A081604(A134025(n)); a(A134026(n))=A081604(A134026(n))+1;

a(A134027(n)) = a(n); a(ABS(A134028(n))) <= a(n);

a(n) = A064099(n-1) for n>1.

n = Sum(A059095(A134421(n)-2-k)*3^k: 0<=k<a(n)), for n>0. - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Oct 25 2007

REFERENCES

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

LINKS

R. Zumkeller, Table of n, a(n) for n = 0..10000

Wikipedia, Balanced Ternary

FORMULA

For n>0: a(n) = ceiling(log(2*n+1)/log(3)).

EXAMPLE

100=1*3^4+1*3^3-1*3^2+0*3^1+1*3^0: a(100)=|++-0+|=5;

200=1*3^5-1*3^4+1*3^3+1*3^2+1*3^1-1*3^0: a(200)=|+-+++-|=6;

300=1*3^5+1*3^4-1*3^3+0*3^2+1*3^1+0*3^0: a(300)=|++-0+0|=6.

CROSSREFS

Sequence in context: A086673 A101787 A064099 this_sequence A130255 A082527 A132944

Adjacent sequences: A134018 A134019 A134020 this_sequence A134022 A134023 A134024

KEYWORD

nonn,base

AUTHOR

Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Oct 19 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified July 26 23:19 EDT 2008. Contains 142293 sequences.


AT&T Labs Research