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.

Previous Showing 11-20 of 22 results. Next

A320863 Powers of 2 with initial digit 7.

Original entry on oeis.org

70368744177664, 72057594037927936, 73786976294838206464, 75557863725914323419136, 77371252455336267181195264, 79228162514264337593543950336, 713623846352979940529142984724747568191373312, 730750818665451459101842416358141509827966271488
Offset: 1

Views

Author

Muniru A Asiru, Oct 26 2018

Keywords

Crossrefs

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

Programs

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

A362871 Leading digit of 6^n.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Jul 15 2023

Keywords

Crossrefs

Programs

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

Formula

a(n) = A000030(A000400(n)).

A363093 Leading digit of 7^n.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Jul 15 2023

Keywords

Crossrefs

Programs

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

Formula

a(n) = A000030(A000420(n)).

A367361 Comma transform of powers of 2.

Original entry on oeis.org

12, 24, 48, 81, 63, 26, 41, 82, 65, 21, 42, 84, 68, 21, 43, 86, 61, 22, 45, 81, 62, 24, 48, 81, 63, 26, 41, 82, 65, 21, 42, 84, 68, 21, 43, 86, 61, 22, 45, 81, 62, 24, 48, 81, 63, 27, 41, 82, 65, 21, 42, 84, 69, 21, 43, 87, 61, 22, 45, 81, 62, 24, 49, 81, 63, 27, 41, 82, 65, 21, 42, 84, 69, 21, 43, 87, 61, 23, 46, 81
Offset: 0

Views

Author

N. J. A. Sloane, Nov 22 2023

Keywords

Comments

See A367360 for further information.

Crossrefs

Programs

  • Mathematica
    FromDigits /@ Partition[Rest@ Flatten[{First[#], Last[#]} & /@ IntegerDigits[2^Range[0, 120]]], 2, 2] (* Michael De Vlieger, Nov 22 2023 *)
  • Python
    from itertools import count, islice, pairwise
    def S(): yield from (str(2**i) for i in count(0))
    def agen(): yield from (int(t[-1]+u[0]) for t, u in pairwise(S()))
    print(list(islice(agen(), 80))) # Michael S. Branicky, Nov 22 2023
    
  • Python
    def A367361(n): return (60,20,40,80)[n&3]+int(str(1<Chai Wah Wu, Dec 22 2023

Formula

a(n) = 10 * A000689(n) + A008952(n+1). - Alois P. Heinz, Nov 22 2023

A141053 Most-significant decimal digit of Fibonacci(5n+3).

Original entry on oeis.org

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

Views

Author

Paul Curtz, Aug 01 2008

Keywords

Comments

Leading digit of A134490(n).
From Johannes W. Meijer, Jul 06 2011: (Start)
The leading digit d, 1 <= d <= 9, of A141053 follows Benford’s Law. This law states that the probability for the leading digit is p(d) = log_10(1+1/d), see the examples.
We observe that the last digit of A134490(n), i.e. F(5*n+3) mod 10, leads to the Lucas sequence A000032(n) (mod 10), i.e. a repetitive sequence of 12 digits [2, 1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9] with p(0) = p(5) = 0, p(1) = p(3) = p(7) = p(9) = 1/6 and p(2) = p(4) = p(6) = p(8) = 1/12. This does not obey Benford’s Law, which would predict that the last digit would satisfy p(d) = 1/10, see the links. (End)

Examples

			From _Johannes W. Meijer_, Jul 06 2011: (Start)
d     p(N=2000) p(N=4000) p(N=6000) p(Benford)
1      0.29900   0.29950   0.30033   0.30103
2      0.17700   0.17675   0.17650   0.17609
3      0.12550   0.12525   0.12517   0.12494
4      0.09650   0.09675   0.09700   0.09691
5      0.07950   0.07950   0.07933   0.07918
6      0.06700   0.06675   0.06700   0.06695
7      0.05800   0.05825   0.05800   0.05799
8      0.05150   0.05125   0.05100   0.05115
9      0.04600   0.04600   0.04567   0.04576
Total  1.00000   1.00000   1.00000   1.00000 (End)
		

Crossrefs

Cf. A000045 (F(n)), A008963 (Initial digit F(n)), A105511-A105519, A003893 (F(n) mod 10), A130893, A186190 (First digit tribonacci), A008952 (Leading digit 2^n), A008905 (Leading digit n!), A045510, A112420 (Leading digit Collatz 3*n+1 starting with 1117065), A007524 (log_10(2)), A104140 (1-log_10(9)). - Johannes W. Meijer, Jul 06 2011

Programs

  • Maple
    A134490 := proc(n) combinat[fibonacci](5*n+3) ; end proc:
    A141053 := proc(n) convert(A134490(n),base,10) ; op(-1,%) ; end proc:
    seq(A141053(n),n=0..70) ; # R. J. Mathar, Jul 04 2011
  • Mathematica
    Table[IntegerDigits[Fibonacci[5n+3]][[1]],{n,0,70}] (* Harvey P. Dale, Jun 22 2025 *)

Formula

a(n) = floor(F(5*n+3)/10^(floor(log(F(5*n+3))/log(10)))). - Johannes W. Meijer, Jul 06 2011
For n>0, a(n) = floor(10^{alpha*n+beta}), where alpha=5*log_10(phi)-1, beta=log_10(1+2/sqrt(5)), {x}=x-floor(x) denotes the fractional part of x, log_10(phi) = A097348, and phi = (1+sqrt(5))/2 = A001622. - Hans J. H. Tuenter, Aug 27 2025

Extensions

Edited by Johannes W. Meijer, Jul 06 2011

A247243 a(n) = smallest positive integer k not already in the sequence such that the decimal expansion of 2^(n-1) begins with k.

Original entry on oeis.org

1, 2, 4, 8, 16, 3, 6, 12, 25, 5, 10, 20, 40, 81, 163, 32, 65, 13, 26, 52, 104, 209, 41, 83, 167, 33, 67, 134, 268, 53, 107, 21, 42, 85, 17, 34, 68, 137, 27, 54, 109, 219, 43, 87, 175, 35, 7, 14, 28, 56, 11, 22, 45, 9, 18, 36, 72, 144, 288, 57, 115, 23, 46, 92
Offset: 1

Views

Author

Paul Tek, Nov 30 2014

Keywords

Comments

Is this a permutation of the positive integers?

Examples

			+----+---------+------+
+  n | 2^(n-1) | a(n) |
+----+---------+------+
|  1 |       1 |    1 |
|  2 |       2 |    2 |
|  3 |       4 |    4 |
|  4 |       8 |    8 |
|  5 |      16 |   16 |
|  6 |      32 |    3 |
|  7 |      64 |    6 |
|  8 |     128 |   12 |
|  9 |     256 |   25 |
| 10 |     512 |    5 |
| 11 |    1024 |   10 |
+----+---------+------+
		

Crossrefs

Cf. A008952.

Programs

  • Perl
    See Link section.
    
  • Python
    from itertools import count, islice
    def ispal(n): s = str(n); return s == s[::-1]
    def agen(): # generator of terms
        aset, mink = set(), 1
        for n in count(1):
            k, target = mink, str(2**(n-1))
            while k in aset or not target.startswith(str(k)): k += 1
            an = k; aset.add(an); yield an
            while mink in aset: mink += 1
    print(list(islice(agen(), 65))) # Michael S. Branicky, Nov 07 2022

A320864 Powers of 2 with initial digit 8.

Original entry on oeis.org

8, 8192, 8388608, 8589934592, 8796093022208, 81129638414606681695789005144064, 83076749736557242056487941267521536, 85070591730234615865843651857942052864, 87112285931760246646623899502532662132736, 89202980794122492566142873090593446023921664
Offset: 1

Views

Author

Muniru A Asiru, Nov 21 2018

Keywords

Crossrefs

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

Programs

  • GAP
    Filtered(List([0..200],n->2^n),i->ListOfDigits(i)[1]=8);
    
  • Maple
    select(x->"8"=""||x[1],[2^n$n=0..200])[];
  • Mathematica
    Select[2^Range[200], IntegerDigits[#][[1]] == 8 &] (* Amiram Eldar, Nov 21 2018 *)
  • PARI
    select(x->(digits(x)[1]==8), vector(200, n, 2^n)) \\ Michel Marcus, Nov 21 2018

A138028 The array of the most significant digit of n^k read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Feb 10 2008

Keywords

Examples

			n\k
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... .
1, 2, 4, 8, 1, 3, 6, 1, 2, 5, 1, 2, 4, 8, 1, 3, 6, 1, 2, 5, 1, ... .
1, 3, 9, 2, 8, 2, 7, 2, 6, 1, 5, 1, 5, 1, 4, 1, 4, 1, 3, 1, 3, ... .
1, 4, 1, 6, 2, 1, 4, 1, 6, 2, 1, 4, 1, 6, 2, 1, 4, 1, 6, 2, 1, ... .
1, 5, 2, 1, 6, 3, 1, 7, 3, 1, 9, 4, 2, 1, 6, 3, 1, 7, 3, 1, 9, ... .
1, 6, 3, 2, 1, 7, 4, 2, 1, 1, 6, 3, 2, 1, 7, 4, 2, 1, 1, 6, 3, ... .
1, 8, 6, 5, 4, 3, 2, 2, 1, 1, 1, 8, 6, 5, 4, 3, 2, 2, 1, 1, 1, ... .
1, 9, 8, 7, 6, 5, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, ... .
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... .
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, ... .
1, 1, 1, 1, 2, 2, 2, 3, 4, 5, 6, 7, 8, 1, 1, 1, 1, 2, 2, 3, 3, ... .
......................................................................
		

Crossrefs

Programs

  • Mathematica
    f[n_, k_] := Quotient[n^k, 10^Floor[k*Log[10, n]]]; Table[f[ n - k, k], {n, 14}, {k, 0, n - 1}] // Flatten

A320865 Powers of 2 with initial digit 9.

Original entry on oeis.org

9007199254740992, 9223372036854775808, 9444732965739290427392, 9671406556917033397649408, 9903520314283042199192993792, 91343852333181432387730302044767688728495783936, 93536104789177786765035829293842113257979682750464
Offset: 1

Views

Author

Muniru A Asiru, Nov 21 2018

Keywords

Crossrefs

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

Programs

  • GAP
    Filtered(List([0..200],n->2^n),i->ListOfDigits(i)[1]=9);
    
  • Maple
    select(x->"9"=""||x[1],[2^n$n=0..200])[];
  • Mathematica
    Select[2^Range[200], IntegerDigits[#][[1]] == 9 &] (* Amiram Eldar, Nov 21 2018 *)
  • PARI
    select(x->(digits(x)[1]==9), vector(200, n, 2^n)) \\ Michel Marcus, Nov 21 2018

A354782 Second digit from left in decimal expansion of 2^n (n >= 4).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jul 07 2022, following a suggestion from Alexander Wajnberg

Keywords

Examples

			2^4 = 16, so a(4) = 6. 2^5 = 32, so a(5) = 2.
		

Crossrefs

Programs

  • Maple
    a:= n-> parse(""||(2^n)[2]):
    seq(a(n), n=4..112);  # Alois P. Heinz, Jul 07 2022
  • Mathematica
    A354782[n_]:=IntegerDigits[2^n][[2]];Array[A354782,100,4] (* Paolo Xausa, Oct 22 2023 *)
  • Python
    def A354782(n): return int(str(1<Chai Wah Wu, Jul 07 2022
Previous Showing 11-20 of 22 results. Next