This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A034887 #55 Jul 06 2025 04:09:37 %S A034887 1,1,1,1,2,2,2,3,3,3,4,4,4,4,5,5,5,6,6,6,7,7,7,7,8,8,8,9,9,9,10,10,10, %T A034887 10,11,11,11,12,12,12,13,13,13,13,14,14,14,15,15,15,16,16,16,16,17,17, %U A034887 17,18,18,18,19,19,19,19,20,20,20,21,21,21,22,22,22 %N A034887 Number of digits in 2^n. %C A034887 The sequence consists of the positive integers, each appearing 3 or 4 times. - _M. F. Hasler_, Oct 08 2016 %H A034887 T. D. Noe, <a href="/A034887/b034887.txt">Table of n, a(n) for n = 0..10000</a> %H A034887 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/MersenneNumber.html">Mersenne Number</a> %F A034887 a(n) = floor(n*log_10(2)) + 1. E.g., a(10)=4 because 2^10 = 1024 and floor(10*log_10(2)) + 1 = 3 + 1 = 4. - _Jaap Spies_, Dec 11 2003 %F A034887 a(n) = A055642(2^n) = A055642(A000079(n)). %p A034887 seq(floor(n*ln(2)/ln(10))+1, n=0..100); # _Jaap Spies_, Dec 11 2003 %t A034887 Table[Length[IntegerDigits[2^n]], {n, 0, 100}] (* _T. D. Noe_, Feb 11 2013 *) %t A034887 IntegerLength[2^Range[0,80]] (* _Harvey P. Dale_, Jul 28 2017 *) %o A034887 (Magma) [#Intseq(2^n): n in [0..100] ]; // _Vincenzo Librandi_, Jun 23 2015 %o A034887 (PARI) A034887(n)=n*log(2)\log(10)+1 \\ or: { a(n)=#digits(1<<n) }. - _M. F. Hasler_, Oct 08 2016 %o A034887 (Python) %o A034887 def a(n): return len(str(1 << n)) %o A034887 print([a(n) for n in range(73)]) # _Michael S. Branicky_, Dec 23 2022 %Y A034887 Cf. A055253, A055254. %Y A034887 Cf. A000079, A055642. %Y A034887 See A125117 for the sequence of first differences. %K A034887 nonn,base,easy %O A034887 0,5 %A A034887 _N. J. A. Sloane_