OFFSET
1,1
COMMENTS
The asymptotic density of this sequence is log_10(9/8) = 0.051152...
MAPLE
x := 1:
L := []:
for n from 0 to 10^3 do
if 8 <= x and x < 9 then
L := [op(L), n]
fi;
x := 2*x;
if x > 10 then
x := (1/10)*x fi;
od:
L;
MATHEMATICA
Select[Range[1010], IntegerDigits[2^#][[1]] == 8 &] (* Amiram Eldar, Nov 12 2023 *)
PROG
(Python)
from itertools import islice
def A367296_gen(): # generator of terms
a, b, c, l = 8, 9, 1, 0
while True:
if a<=c:
if c<b:
yield l
a *= 10
b *= 10
c <<= 1
l += 1
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Martin Renner, Nov 12 2023
STATUS
approved