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-6 of 6 results.

A320859 Powers of 2 with initial digit 3.

Original entry on oeis.org

32, 32768, 33554432, 34359738368, 35184372088832, 36028797018963968, 36893488147419103232, 37778931862957161709568, 302231454903657293676544, 38685626227668133590597632, 309485009821345068724781056, 39614081257132168796771975168, 316912650057057350374175801344
Offset: 1

Views

Author

Muniru A Asiru, Oct 22 2018

Keywords

Crossrefs

Cf. A000079 (Powers of 2), A008952 (leading digit of 2^n).
Powers of 2 with initial digit k, (k = 1..4): A067488, A067480, this sequence, A320860.
Cf. A172404.

Programs

  • GAP
    Filtered(List([0..120],n->2^n),i->ListOfDigits(i)[1]=3);
    
  • Magma
    [2^n: n in [1..100] | Intseq(2^n)[#Intseq(2^n)] eq 3]; // G. C. Greubel, Oct 24 2018
    
  • Maple
    select(x->"3"=""||x[1],[2^n$n=0..120])[];
  • Mathematica
    Select[2^Range[0, 100], First[IntegerDigits[#]] == 3 &] (* G. C. Greubel, Oct 24 2018 *)
  • PARI
    lista(nn) = {for(n=1, nn, x = 2^n; if (digits(x=2^n)[1] == 3, print1(x, ", ")););} \\ Michel Marcus, Oct 25 2018

Formula

a(n) = 2^A172404(n).

A330243 Numbers k such that the first digit of the decimal expansion of 2^k is 7.

Original entry on oeis.org

46, 56, 66, 76, 86, 96, 149, 159, 169, 179, 189, 242, 252, 262, 272, 282, 292, 345, 355, 365, 375, 385, 438, 448, 458, 468, 478, 488, 531, 541, 551, 561, 571, 581, 634, 644, 654, 664, 674, 727, 737, 747, 757, 767, 777, 830, 840, 850, 860, 870, 923, 933, 943, 953
Offset: 1

Views

Author

Eder Vanzei, Dec 06 2019

Keywords

Comments

The asymptotic density of this sequence is log_10(8/7) = 0.057991... - Amiram Eldar, Jan 27 2021

Examples

			70368744177664 = 2^46.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000], Floor[2^# / 10^(Floor[# * Log10[2]])] == 7 &] (* Amiram Eldar, Dec 07 2019 *)
    Select[Range[1000],IntegerDigits[2^#][[1]]==7&] (* or *) Select[Range[ 1000],NumberDigit[2^#,IntegerLength[2^#]-1]==7&] (* Harvey P. Dale, Aug 10 2021 *)
  • Python
    A330243_list = [n for n in range(10**3) if str(2**n)[0] == '7'] # Chai Wah Wu, Dec 12 2019

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

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

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-6 of 6 results.