cp's OEIS Frontend

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.

A067497 Smallest k for which 2^k is n+1 decimal digits long, and equivalently numbers k such that 1 is the first digit of 2^k.

This page as a plain text file.
%I A067497 #63 Sep 01 2024 10:31:31
%S A067497 0,4,7,10,14,17,20,24,27,30,34,37,40,44,47,50,54,57,60,64,67,70,74,77,
%T A067497 80,84,87,90,94,97,100,103,107,110,113,117,120,123,127,130,133,137,
%U A067497 140,143,147,150,153,157,160,163,167,170,173,177,180,183,187,190,193,196
%N A067497 Smallest k for which 2^k is n+1 decimal digits long, and equivalently numbers k such that 1 is the first digit of 2^k.
%C A067497 The asymptotic density of this sequence is log_10(2) = 0.301029... (A007524). - _Amiram Eldar_, Jan 27 2021
%H A067497 Muniru A Asiru, <a href="/A067497/b067497.txt">Table of n, a(n) for n = 0..5000</a>
%F A067497 a(n) = ceiling(n*log_2(10)). - _Vladeta Jovovic_, Jun 20 2002
%F A067497 a(n) = log_2(A067488(n+1)). - _Charles L. Hohn_, Jun 09 2024
%t A067497 a[n_] := Block[{k = 0}, While[ Floor[Log[10, 2^k] + 1] < n, k++ ]; k]; Table[ a[n], {n, 1, 61}]
%t A067497 Table[Ceiling[n*Log[2, 10]], {n, 0, 59}] (* _Jean-François Alcover_, Jan 29 2014, after _Vladeta Jovovic_ *)
%o A067497 (PARI) for(n=0,500, if(floor(2^n/10^(floor(n*log(2)/log(10))))==1,print1(n,", ")))
%o A067497 (PARI) a(n) = ceil(n*log(10)/log(2)); \\ _Michel Marcus_, May 13 2017
%o A067497 (GAP) Filtered([0..200],n->ListOfDigits(2^n)[1]=1); # _Muniru A Asiru_, Oct 22 2018
%o A067497 (Python)
%o A067497 def A067497(n): return (10**n-1).bit_length() # _Chai Wah Wu_, Apr 02 2023
%o A067497 (Sage) [ceil(n*log(10)/log(2)) for n in range(0, 60)] # _Stefano Spezia_, Aug 31 2024
%Y A067497 Cf. A000079, A007524, A066343, A067480, A067488, A129344.
%K A067497 base,nonn,easy
%O A067497 0,2
%A A067497 _Benoit Cloitre_, Feb 22 2002
%E A067497 Additional comments from _Lekraj Beedassy_, Jun 20 2002 and from Rick Shephard, Jun 27 2002