|
|
A172404
|
|
Numbers k such that 3 is the first digit of 2^k.
|
|
7
|
|
|
5, 15, 25, 35, 45, 55, 65, 75, 78, 85, 88, 95, 98, 108, 118, 128, 138, 148, 158, 168, 178, 181, 188, 191, 201, 211, 221, 231, 241, 251, 261, 271, 274, 281, 284, 291, 294, 304, 314, 324, 334, 344, 354, 364, 367, 374, 377, 384, 387, 397, 407, 417, 427, 437, 447, 457, 467, 470, 477, 480, 487, 490, 500
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The asymptotic density of this sequence is log_10(4/3) = 0.124938... - Amiram Eldar, Jan 27 2021
|
|
LINKS
|
|
|
MAPLE
|
x := 1.; L := []; for n from 0 to 500 do if 3 < x and x < 4 then L := [op(L), n] end if; x := 2*x; if x > 10 then x := (1/10)*x end if end do; L;
|
|
MATHEMATICA
|
Select[Range[1000], IntegerDigits[2^#][[1]] == 3 &]
|
|
PROG
|
(Python)
ans, x = [], 1.
for n in range(501):
if 3 < x < 4: ans.append(n)
x = x*2
if x > 10: x = x / 10
print(ans)
(Python)
from itertools import islice
def A172404_gen(): # generator of terms
a, b, c, l = 3, 4, 1, 0
while True:
if a<=c:
if c<b:
yield l
a *= 10
b *= 10
c <<= 1
l += 1
(GAP) Filtered([1..500], n->ListOfDigits(2^n)[1]=3); # Muniru A Asiru, Oct 17 2018
(PARI) isok(n) = digits(2^n)[1] == 3; \\ Michel Marcus, Oct 18 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|