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.

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

Original entry on oeis.org

3, 13, 23, 33, 43, 106, 116, 126, 136, 146, 199, 209, 219, 229, 239, 302, 312, 322, 332, 342, 395, 405, 415, 425, 435, 498, 508, 518, 528, 538, 591, 601, 611, 621, 631, 684, 694, 704, 714, 724, 787, 797, 807, 817, 827, 880, 890, 900, 910, 920, 983, 993, 1003
Offset: 1

Views

Author

Martin Renner, Nov 12 2023

Keywords

Comments

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

Crossrefs

Programs

  • 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;
    # alternative:
    select(t -> floor(2^t/10^ilog10(2^t))=8, [$1..10^4]); # Robert Israel, Nov 12 2024
  • Mathematica
    Select[Range[1010], IntegerDigits[2^#][[1]] == 8 &] (* Amiram Eldar, Nov 12 2023 *)
  • 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 cA367296_list = list(islice(A367296_gen(),30)) # Chai Wah Wu, Nov 13 2023