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!)
A367296 Numbers k such that 8 is the first digit of 2^k. 4

%I #16 Nov 13 2023 07:32:29

%S 3,13,23,33,43,106,116,126,136,146,199,209,219,229,239,302,312,322,

%T 332,342,395,405,415,425,435,498,508,518,528,538,591,601,611,621,631,

%U 684,694,704,714,724,787,797,807,817,827,880,890,900,910,920,983,993,1003

%N Numbers k such that 8 is the first digit of 2^k.

%C The asymptotic density of this sequence is log_10(9/8) = 0.051152...

%p x := 1:

%p L := []:

%p for n from 0 to 10^3 do

%p if 8 <= x and x < 9 then

%p L := [op(L), n]

%p fi;

%p x := 2*x;

%p if x > 10 then

%p x := (1/10)*x fi;

%p od:

%p L;

%t Select[Range[1010], IntegerDigits[2^#][[1]] == 8 &] (* _Amiram Eldar_, Nov 12 2023 *)

%o (Python)

%o from itertools import islice

%o def A367296_gen(): # generator of terms

%o a, b, c, l = 8, 9, 1, 0

%o while True:

%o if a<=c:

%o if c<b:

%o yield l

%o a *= 10

%o b *= 10

%o c <<= 1

%o l += 1

%o A367296_list = list(islice(A367296_gen(),30)) # _Chai Wah Wu_, Nov 13 2023

%Y Cf. A000079, A067497, A067469, A172404, A367294, A363060, A367295, A330243, A097415.

%K nonn,base

%O 1,1

%A _Martin Renner_, Nov 12 2023

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 July 14 02:38 EDT 2024. Contains 374291 sequences. (Running on oeis4.)