A020914 Number of digits in the base-2 representation of 3^n.
1, 2, 4, 5, 7, 8, 10, 12, 13, 15, 16, 18, 20, 21, 23, 24, 26, 27, 29, 31, 32, 34, 35, 37, 39, 40, 42, 43, 45, 46, 48, 50, 51, 53, 54, 56, 58, 59, 61, 62, 64, 65, 67, 69, 70, 72, 73, 75, 77, 78, 80, 81, 83, 85, 86, 88, 89, 91, 92, 94, 96, 97, 99, 100, 102, 104, 105, 107
Offset: 0
Links
- T. D. Noe, R. J. Mathar, Table of n, a(n) for n = 0..20000
- Mike Winkler, On the structure and the behaviour of Collatz 3n + 1 sequences, 2014.
- Mike Winkler, New results on the stopping time behaviour of the Collatz 3x + 1 function, arXiv:1504.00212 [math.GM], 2015.
- 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
a020914 = a070939 . a000244 -- Reinhard Zumkeller, Jun 30 2013
-
Maple
A020914 :=n->nops(convert(3^n,base,2)): seq(A020914(n),n=0..70); # Emeric Deutsch, Apr 30 2006 seq(ilog2(3^n)+1, n=0 .. 100); # Robert Israel, Dec 12 2014
-
Mathematica
Table[Length[IntegerDigits[3^n, 2]], {n, 0, 100}] (* Stefan Steinerberger, Apr 19 2006 *) a[n_] := Floor[ Log2[3^n] + 1]; Array[a, 105, 0] (* Robert G. Wilson v, May 25 2014 *)
-
PARI
for(n=0,100,print1(floor(1+n*log(3)/log(2)),",")) \\ K. Spage, Oct 22 2009
-
PARI
a(n)=exponent(3^n)+1 \\ Charles R Greathouse IV, Nov 03 2022
-
Python
def A020914(n): return (3**n).bit_length() # Chai Wah Wu, Oct 09 2024
Formula
a(n) = floor(1 + n*log(3)/log(2)). - K. Spage, Oct 22 2009
A098294(n) = a(n) + n for n > 0. - Mike Winkler, Dec 31 2010
a(n) = A070939(A000244(n)) = length of n-th row in triangle A227048. - Reinhard Zumkeller, Jun 30 2013
a(n) = 1 + floor(n*log_2(3)) = 1 + A056576(n) = 1 + floor(n*A020857). - L. Edson Jeffery, Dec 12 2014
A020915(a(n)) = n + 1. - Reinhard Zumkeller, Mar 28 2015
Extensions
More terms from Stefan Steinerberger, Apr 19 2006
Comments