login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A020915 Number of digits in base-3 representation of 2^n. 10
1, 1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12, 12, 13, 14, 14, 15, 16, 16, 17, 18, 18, 19, 19, 20, 21, 21, 22, 23, 23, 24, 24, 25, 26, 26, 27, 28, 28, 29, 30, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 38, 39, 40, 40, 41, 42, 42, 43, 43, 44, 45, 45, 46, 47 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
For n > 0, first differences of A022331. - Michel Marcus, Oct 03 2013
LINKS
FORMULA
a(n) = 1 + floor(n*log_3(2)) = 1 + floor(n*A102525) = 1 + A136409(n). - R. J. Mathar, May 23 2009
a(n) = A081604(A000079(n)). - Reinhard Zumkeller, Jul 12 2011
a(A020914(n)) = n + 1. - Reinhard Zumkeller, Mar 28 2015
MATHEMATICA
Table[Length[IntegerDigits[2^n, 3]], {n, 0, 80}] (* Harvey P. Dale, May 02 2012 *)
Table[1 + Floor[n*Log[3, 2]], {n, 0, 73}] (* L. Edson Jeffery, Dec 04 2015 *)
IntegerLength[2^Range[0, 80], 3] (* Harvey P. Dale, Nov 17 2022 *)
PROG
(Haskell)
a020915 = a081604 . a000079 -- Reinhard Zumkeller, Mar 28 2015
(PARI) a(n)=logint(2^n, 3)+1 \\ Charles R Greathouse IV, Sep 02 2015
(Magma) [Round(1+Floor(n*(Log(2))/Log(3))): n in [0..80]]; // Vincenzo Librandi, Dec 05 2015
CROSSREFS
Cf. A022924 (first differences).
Sequence in context: A367068 A005379 A029922 * A156301 A195124 A032509
KEYWORD
nonn,base,easy,nice
AUTHOR
EXTENSIONS
More terms from James A. Sellers
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 06:32 EDT 2024. Contains 370953 sequences. (Running on oeis4.)