A020915 Number of digits in base-3 representation of 2^n.
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
Offset: 0
Links
- William A. Tedeschi, Table of n, a(n) for n = 0..10000
- Mike Winkler, The algorithmic structure of the finite stopping time behavior of the 3x+1 function, arXiv:1709.03385 [math.GM], 2017.
Crossrefs
Programs
-
Haskell
a020915 = a081604 . a000079 -- Reinhard Zumkeller, Mar 28 2015
-
Magma
[Round(1+Floor(n*(Log(2))/Log(3))): n in [0..80]]; // Vincenzo Librandi, Dec 05 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 *)
-
PARI
a(n)=logint(2^n,3)+1 \\ Charles R Greathouse IV, Sep 02 2015
Formula
a(A020914(n)) = n + 1. - Reinhard Zumkeller, Mar 28 2015
Extensions
More terms from James Sellers
Comments