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!)
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
Seiichi Manyama, Table of n, a(n) for n = 1..10000 (first 4200 terms from Muniru A Asiru)
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
A172404_list = list(islice(A172404_gen(), 30)) # Chai Wah Wu, Nov 13 2023
(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
Cf. A000079.
Sequence in context: A121025 A277592 A323354 * A031322 A017329 A068528
KEYWORD
nonn,base,easy
AUTHOR
David Radcliffe, Nov 20 2010
STATUS
approved

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 March 19 06:05 EDT 2024. Contains 370952 sequences. (Running on oeis4.)