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

%I #59 Jan 07 2023 04:03:24

%S 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,

%T 18,19,19,20,21,21,22,23,23,24,24,25,26,26,27,28,28,29,30,30,31,31,32,

%U 33,33,34,35,35,36,36,37,38,38,39,40,40,41,42,42,43,43,44,45,45,46,47

%N Number of digits in base-3 representation of 2^n.

%C For n > 0, first differences of A022331. - _Michel Marcus_, Oct 03 2013

%H William A. Tedeschi, <a href="/A020915/b020915.txt">Table of n, a(n) for n = 0..10000</a>

%H Mike Winkler, <a href="https://arxiv.org/abs/1709.03385">The algorithmic structure of the finite stopping time behavior of the 3x+1 function</a>, arXiv:1709.03385 [math.GM], 2017.

%F a(n) = 1 + floor(n*log_3(2)) = 1 + floor(n*A102525) = 1 + A136409(n). - _R. J. Mathar_, May 23 2009

%F a(n) = A081604(A000079(n)). - _Reinhard Zumkeller_, Jul 12 2011

%F a(A020914(n)) = n + 1. - _Reinhard Zumkeller_, Mar 28 2015

%t Table[Length[IntegerDigits[2^n,3]],{n,0,80}] (* _Harvey P. Dale_, May 02 2012 *)

%t Table[1 + Floor[n*Log[3, 2]], {n, 0, 73}] (* _L. Edson Jeffery_, Dec 04 2015 *)

%t IntegerLength[2^Range[0,80],3] (* _Harvey P. Dale_, Nov 17 2022 *)

%o (Haskell)

%o a020915 = a081604 . a000079 -- _Reinhard Zumkeller_, Mar 28 2015

%o (PARI) a(n)=logint(2^n,3)+1 \\ _Charles R Greathouse IV_, Sep 02 2015

%o (Magma) [Round(1+Floor(n*(Log(2))/Log(3))): n in [0..80]]; // _Vincenzo Librandi_, Dec 05 2015

%Y Cf. A007089, A020914, A076227, A081604, A000079.

%Y Cf. A022331, A102525, A136409.

%Y Cf. A022924 (first differences).

%K nonn,base,easy,nice

%O 0,3

%A _Clark Kimberling_

%E More terms from _James A. Sellers_

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 April 25 13:12 EDT 2024. Contains 371969 sequences. (Running on oeis4.)