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.

Showing 1-4 of 4 results.

A172404 Numbers k such that 3 is the first digit of 2^k.

Original entry on oeis.org

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
Offset: 1

Views

Author

David Radcliffe, Nov 20 2010

Keywords

Comments

The asymptotic density of this sequence is log_10(4/3) = 0.124938... - Amiram Eldar, Jan 27 2021

Crossrefs

Programs

  • GAP
    Filtered([1..500],n->ListOfDigits(2^n)[1]=3); # Muniru A Asiru, Oct 17 2018
    
  • 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 &]
  • PARI
    isok(n) = digits(2^n)[1] == 3; \\ Michel Marcus, Oct 18 2018
  • 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 cA172404_list = list(islice(A172404_gen(),30)) # Chai Wah Wu, Nov 13 2023
    

A363060 Numbers k such that 5 is the first digit of 2^k.

Original entry on oeis.org

9, 19, 29, 39, 49, 59, 69, 102, 112, 122, 132, 142, 152, 162, 172, 195, 205, 215, 225, 235, 245, 255, 265, 298, 308, 318, 328, 338, 348, 358, 391, 401, 411, 421, 431, 441, 451, 461, 494, 504, 514, 524, 534, 544, 554, 587, 597, 607, 617, 627, 637, 647, 657, 680, 690
Offset: 1

Views

Author

Ctibor O. Zizka, May 16 2023

Keywords

Comments

The asymptotic density of this sequence is log_10(6/5) = 0.0791812... . - Amiram Eldar, May 16 2023
In base B we may consider numbers k such that some integer Y >= 1 forms the first digit(s) of X^k. For such numbers k the following inequality holds: log_B(Y) - floor(log_B(Y)) <= k*log_B(X) - floor(k*log_B(X)) < log_B(Y+1) - floor(log_B(Y+1)). The irrationality of log_B(X) is the necessary condition; see the Links section. Examples in the OEIS: B = 10, X = 2; Y = 1 (A067497), Y = 2 (A067469), Y = 3 (A172404).

Examples

			k = 9: the first digit of 2^9 = 512 is 5, thus k = 9 is a term.
		

Crossrefs

Programs

  • Maple
    R:= NULL: count:= 0: t:= 1:
    for k from 1 while count < 100 do
      t:= 2*t;
      if floor(t/10^ilog10(t)) = 5 then R:= R,k; count:= count+1 fi
    od:
    R; # Robert Israel, May 19 2023
  • Mathematica
    Select[Range[700], IntegerDigits[2^#][[1]] == 5 &] (* Amiram Eldar, May 16 2023 *)
  • PARI
    isok(k) = digits(2^k)[1] == 5; \\ Michel Marcus, May 16 2023
    
  • Python
    from itertools import count, islice
    def A363060_gen(startvalue=1): # generator of terms >= startvalue
        m = 1<<(k:=max(startvalue,1))
        for i in count(k):
            if str(m)[0]=='5':
                yield i
            m <<= 1
    A363060_list = list(islice(A363060_gen(),20)) # Chai Wah Wu, May 21 2023

A367294 Numbers k such that 4 is the first digit of 2^k.

Original entry on oeis.org

2, 12, 22, 32, 42, 52, 62, 72, 82, 92, 105, 115, 125, 135, 145, 155, 165, 175, 185, 198, 208, 218, 228, 238, 248, 258, 268, 278, 288, 301, 311, 321, 331, 341, 351, 361, 371, 381, 394, 404, 414, 424, 434, 444, 454, 464, 474, 484, 497, 507, 517, 527, 537, 547
Offset: 1

Views

Author

Martin Renner, Nov 12 2023

Keywords

Comments

The asymptotic density of this sequence is log_10(5/4) = 0.096910...

Crossrefs

Programs

  • Maple
    x := 1:
    L := []:
    for n from 0 to 10^3 do
      if 4 <= x and x < 5 then
        L := [op(L), n]
      fi;
      x := 2*x;
      if x > 10 then
        x := (1/10)*x fi;
    od:
    L;
  • Mathematica
    Select[Range[550], IntegerDigits[2^#][[1]] == 4 &] (* Amiram Eldar, Nov 12 2023 *)

A367295 Numbers k such that 6 is the first digit of 2^k.

Original entry on oeis.org

6, 16, 26, 36, 79, 89, 99, 109, 119, 129, 139, 182, 192, 202, 212, 222, 232, 275, 285, 295, 305, 315, 325, 335, 368, 378, 388, 398, 408, 418, 428, 471, 481, 491, 501, 511, 521, 564, 574, 584, 594, 604, 614, 624, 667, 677, 687, 697, 707, 717, 760, 770, 780, 790
Offset: 1

Views

Author

Martin Renner, Nov 12 2023

Keywords

Comments

The asymptotic density of this sequence is log_10(7/6) = 0.066946...

Crossrefs

Programs

  • Maple
    x := 1:
    L := []:
    for n from 0 to 10^3 do
      if 6 <= x and x < 7 then
        L := [op(L), n]
      fi;
      x := 2*x;
      if x > 10 then
        x := (1/10)*x fi;
    od:
    L;
  • Mathematica
    Select[Range[800], IntegerDigits[2^#][[1]] == 6 &] (* Amiram Eldar, Nov 12 2023 *)
Showing 1-4 of 4 results.