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 A129344 #26 Sep 08 2024 13:50:41 %S A129344 4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,3,4,3,3, %T A129344 4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,3,4,3,3,4,3,3,4,3,3, %U A129344 4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,4,3,3,3,4,3,3 %N A129344 a(n) is the number of powers of 2 that have n decimal digits. %C A129344 Ignoring the first term, first differences of A066343. - _Andrew Woods_, Jun 10 2013 %H A129344 Amiram Eldar, <a href="/A129344/b129344.txt">Table of n, a(n) for n = 1..10000</a> %F A129344 For n>1, a(n) = floor(n*L)-floor((n-1)*L) where L = log(10)/log(2). - _Andrew Woods_, Jun 10 2013 %F A129344 Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = log_2(10) (A020862). - _Amiram Eldar_, Apr 09 2021 %e A129344 a(1) is 4 because there are 4 one-digit powers of 2: 1, 2, 4, 8. %t A129344 Table[Transpose[ Select[Table[{n, 2^n}, {n, 0, 310}], IntegerDigits[ #[[2]]][[1]] == 1 &]][[1]][[k]] - Transpose[ Select[Table[{n, 2^n}, {n, 0, 310}], IntegerDigits[ #[[2]]][[1]] == 1 &]][[1]][[k - 1]], {k, 2, 94}] %t A129344 Join[{4}, Differences @ Table[Floor[n*Log2[10]], {n, 100}]] (* _Amiram Eldar_, Apr 09 2021 *) %o A129344 (PARI) a(n) = my(k=0, i=0); while(#Str(2^k)!=n, k++); while(#Str(2^k)==n, i++; k++); i \\ _Felix Fröhlich_, Jan 19 2016 %o A129344 (Python) %o A129344 def A129344(n): return -(m:=5**(n-1)).bit_length()+(5*m).bit_length()+1 if n>1 else 4 # _Chai Wah Wu_, Sep 08 2024 %Y A129344 First differences of A067497. %Y A129344 Cf. A000079, A020862, A066343. %K A129344 base,nonn %O A129344 1,1 %A A129344 _Tanya Khovanova_, May 28 2007