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-10 of 22 results. Next

A364185 Leading digit of 11^n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 8, 9, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 6, 6, 7, 8, 8, 9, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, 7, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 7, 7, 8, 9, 1, 1, 1, 1
Offset: 0

Views

Author

Seiichi Manyama, Jul 15 2023

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := IntegerDigits[11^n][[1]]; Array[a, 100, 0] (* Amiram Eldar, Jul 15 2023 *)
  • PARI
    a(n) = digits(11^n)[1];

Formula

a(n) = A000030(A001020(n)).

A000689 Final decimal digit of 2^n.

Original entry on oeis.org

1, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6, 2, 4, 8, 6
Offset: 0

Views

Author

Keywords

Comments

These are the analogs of the powers of 2 in carryless arithmetic mod 10.
Let G = {2,4,8,6}. Let o be defined as XoY = least significant digit in XY. Then (G,o) is an Abelian group wherein 2 is a generator (also see the first comment under A001148). - K.V.Iyer, Mar 12 2010
This is also the decimal expansion of 227/1818. - Kritsada Moomuang, Dec 21 2021

Examples

			G.f. = 1 + 2*x + 4*x^2 + 8*x^3 + 6*x^4 + 2*x^5 + 4*x^6 + 8*x^7 + 6*x^8 + ...
		

Crossrefs

Programs

  • Haskell
    a000689 n = a000689_list !! n
    a000689_list = 1 : cycle [2,4,8,6]  -- Reinhard Zumkeller, Sep 15 2011
  • Magma
    [2^n mod 10: n in [0..150]]; // Vincenzo Librandi, Apr 12 2011
    
  • Mathematica
    Table[PowerMod[2, n, 10], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)
  • PARI
    for(n=0,80, if(n,{x=(n+3)%4+1; print1(10-(4*x^3+47*x-27*x^2)/3,", ")},{print1("1, ")}))
    
  • SageMath
    [power_mod(2,n,10)for n in range(0, 81)] # Zerinvary Lajos, Nov 03 2009
    

Formula

Periodic with period 4.
a(n) = 2^n mod 10.
a(n) = A002081(n) - A002081(n-1), for n > 0.
From R. J. Mathar, Apr 13 2010: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3), n > 3.
G.f.: (x+3*x^2+5*x^3+1)/((1-x) * (1+x^2)). (End)
For n >= 1, a(n) = 10 - (4x^3 + 47x - 27x^2)/3, where x = (n+3) mod 4 + 1.
For n >= 1, a(n) = A070402(n) + 5*floor( ((n-1) mod 4)/2 ).
G.f.: 1 / (1 - 2*x / (1 + 5*x^3 / (1 + x / (1 - 3*x / (1 + 3*x))))). - Michael Somos, May 12 2012
a(n) = 5 + cos((n*Pi)/2) - 3*sin((n*Pi)/2) for n >= 1. - Kritsada Moomuang, Dec 21 2021

A111395 First digit of powers of 5.

Original entry on oeis.org

1, 5, 2, 1, 6, 3, 1, 7, 3, 1, 9, 4, 2, 1, 6, 3, 1, 7, 3, 1, 9, 4, 2, 1, 5, 2, 1, 7, 3, 1, 9, 4, 2, 1, 5, 2, 1, 7, 3, 1, 9, 4, 2, 1, 5, 2, 1, 7, 3, 1, 8, 4, 2, 1, 5, 2, 1, 6, 3, 1, 8, 4, 2, 1, 5, 2, 1, 6, 3, 1, 8, 4, 2, 1, 5, 2, 1, 6, 3, 1, 8, 4, 2, 1, 5, 2, 1, 6
Offset: 0

Views

Author

Almerio A. Castro (almerio.castro(AT)gmail.com), Nov 11 2005

Keywords

Crossrefs

Programs

  • Mathematica
    First[IntegerDigits[#]]&/@(5^Range[0,100]) (* Harvey P. Dale, Jan 13 2015 *)
  • PARI
    a(n) = digits(5^n)[1]; \\ Michel Marcus, Jan 07 2014

Formula

a(n) = A000030(A000351(n)). - Seiichi Manyama, Jul 15 2023

Extensions

a(0)=1 prepended, and more terms from Michel Marcus, Jan 07 2014

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).

A320860 Powers of 2 with initial digit 4.

Original entry on oeis.org

4, 4096, 4194304, 4294967296, 4398046511104, 4503599627370496, 4611686018427387904, 4722366482869645213696, 4835703278458516698824704, 4951760157141521099596496896, 40564819207303340847894502572032, 41538374868278621028243970633760768
Offset: 1

Views

Author

Muniru A Asiru, Oct 22 2018

Keywords

Comments

Differs from A067482 first at n = 11.

Crossrefs

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

Programs

  • GAP
    Filtered(List([0..150],n->2^n),i->ListOfDigits(i)[1]=4);
    
  • Magma
    [2^n: n in [1..160] | Intseq(2^n)[#Intseq(2^n)] eq 4]; // G. C. Greubel, Oct 27 2018
  • Maple
    select(x->"4"=""||x[1],[2^n$n=0..150])[];
  • Mathematica
    Select[2^Range[160], First[IntegerDigits[#]] == 4 &] (* G. C. Greubel, Oct 27 2018 *)
  • PARI
    select(x->(digits(x)[1]==4), vector(200, n, 2^n)) \\ Michel Marcus, Oct 26 2018
    

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

A320861 Powers of 2 with initial digit 5.

Original entry on oeis.org

512, 524288, 536870912, 549755813888, 562949953421312, 576460752303423488, 590295810358705651712, 5070602400912917605986812821504, 5192296858534827628530496329220096, 5316911983139663491615228241121378304, 5444517870735015415413993718908291383296
Offset: 1

Views

Author

Muniru A Asiru, Oct 23 2018

Keywords

Crossrefs

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

Programs

  • GAP
    Filtered(List([0..160],n->2^n),i->ListOfDigits(i)[1]=5);
    
  • Magma
    [2^n: n in [1..200] | Intseq(2^n)[#Intseq(2^n)] eq 5]; // Vincenzo Librandi, Oct 25 2018
  • Maple
    select(x->"5"=""||x[1],[2^n$n=0..160])[];
    # Alternative:
    Res:= NULL: count:= 0:
    for k from 1 to 49 do
       n:= ilog2(6*10^k);
       if n > ilog2(5*10^k) then count:= count+1;
         Res:= Res, 2^n;
       fi
    od:
    Res; # Robert Israel, Oct 26 2018
  • Mathematica
    Select[2^Range[200], First[IntegerDigits[#]]==5 &] (* Vincenzo Librandi, Oct 25 2018 *)
  • PARI
    lista(nn) = {for(n=1, nn, x = 2^n; if (digits(x=2^n)[1] == 5, print1(x, ", ")););} \\ Michel Marcus, Oct 25 2018
    

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

A320862 Powers of 2 with initial digit 6.

Original entry on oeis.org

64, 65536, 67108864, 68719476736, 604462909807314587353088, 618970019642690137449562112, 633825300114114700748351602688, 649037107316853453566312041152512, 664613997892457936451903530140172288, 680564733841876926926749214863536422912
Offset: 1

Views

Author

Muniru A Asiru, Oct 23 2018

Keywords

Crossrefs

Cf. A000079 (powers of 2), A008952 (leading digit of 2^n), A217399 (numbers starting with 6).
Powers of 2 with initial digit k, (k = 1..6): A067488, A067480, A320859, A320860, A320861, this sequence.

Programs

  • GAP
    Filtered(List([0..180],n->2^n),i->ListOfDigits(i)[1]=6);
    
  • Magma
    [2^n: n in [1..160] | Intseq(2^n)[#Intseq(2^n)] eq 6]; // G. C. Greubel, Oct 27 2018
  • Maple
    select(x->"6"=""||x[1],[2^n$n=0..180])[];
  • Mathematica
    Select[2^Range[160], First[IntegerDigits[#]] == 6 &] (* G. C. Greubel, Oct 27 2018 *)
  • PARI
    select(x->(digits(x)[1]==6), vector(200, n, 2^n)) \\ Michel Marcus, Oct 26 2018
    

A363249 Leading digit of 9^n.

Original entry on oeis.org

1, 9, 8, 7, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 9, 8, 7, 7, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 9, 8, 7, 7, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 9, 8, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 9, 8, 7, 6, 6, 5, 4, 4, 4, 3, 3, 2, 2
Offset: 0

Views

Author

Seiichi Manyama, Jul 15 2023

Keywords

References

  • He, Xinwei; Hildebrand, A J; Li, Yuchen; Zhang, Yunyi, Complexity of Leading Digit Sequences, Discrete Mathematics and Theoretical Computer Science; 22 (2020), #14.

Crossrefs

Programs

  • Mathematica
    a[n_] := IntegerDigits[9^n][[1]]; Array[a, 100, 0] (* Amiram Eldar, Jul 15 2023 *)
  • PARI
    a(n) = digits(9^n)[1];

Formula

a(n) = A000030(A001019(n)).
a(n) = A060956(2*n).
Showing 1-10 of 22 results. Next