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 13 results. Next

A118764 Inverse of A118763.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10, 21, 22, 23, 24, 25, 26, 27, 28, 20, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 30, 41, 42, 43, 44, 45, 46, 47, 48, 40, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 50, 61, 62, 63, 64, 65, 66, 67, 68, 60, 69, 71, 72, 73
Offset: 0

Views

Author

Reinhard Zumkeller, May 01 2006

Keywords

Comments

Permutation of the natural numbers with fixed points A118767: a(A118767(n))=A118767(n);
A118766(n) = a(a(n)).

Crossrefs

Cf. A118758.

Programs

  • Mathematica
    (* first do Mmca in A118763, then *) Flatten@ Table[Position[s, n], {n, 0, 100}] - 1 (* Robert G. Wilson v, Sep 22 2016 *)

A118765 A118763(A118763(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 18, 19, 10, 11, 12, 13, 14, 15, 16, 17, 27, 28, 20, 21, 22, 23, 24, 25, 26, 29, 38, 39, 30, 31, 32, 33, 34, 35, 36, 37, 47, 48, 40, 41, 42, 43, 44, 45, 46, 49, 58, 59, 50, 51, 52, 53, 54, 55, 56, 57, 67, 68, 60, 61, 62, 63, 64, 65, 66, 69, 78, 79, 70
Offset: 0

Views

Author

Reinhard Zumkeller, May 01 2006

Keywords

Comments

Inverse integer permutation of A118766;
A118764(a(n)) = a(A118764(n)) = A118763(n).

Crossrefs

Cf. A118766.

A118767 Fixed points of permutations A118763, A118764, A118765 and A118766.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 29, 49, 69, 89
Offset: 1

Views

Author

Reinhard Zumkeller, May 01 2006

Keywords

Comments

A118763(a(n)) = A118764(a(n)) = A118765(a(n)) = A118766(a(n)) = a(n).
No more terms less than 10^4. Looking at the pattern mod 9, I conjecture that there will be more terms past 10^8. - Joshua Zucker, May 14 2006

Crossrefs

Cf. A118761.

A118768 First differences of A118763.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 10, -9, 1, 1, 1, 1, 1, 1, 1, 1, 10, -8, 1, 1, 1, 1, 1, 1, 1, 2, 10, -9, 1, 1, 1, 1, 1, 1, 1, 1, 10, -8, 1, 1, 1, 1, 1, 1, 1, 2, 10, -9, 1, 1, 1, 1, 1, 1, 1, 1, 10, -8, 1, 1, 1, 1, 1, 1, 1, 2, 10, -9, 1, 1, 1, 1, 1, 1, 1, 1, 10, -8, 1, 1, 1, 1, 1, 1, 1, 2, 10, -9, 1, 1, 1, 1, 1, 1, 1, 1, 100, -90, -8, 1, 1, 1, 1, 1, 1, 1, 2, 10, -9, 1, 1, 1
Offset: 1

Views

Author

Reinhard Zumkeller, May 01 2006

Keywords

Crossrefs

Cf. A118762.

Formula

a(n) = A118763(n+1) - A118763(n).

A118757 Permutation of the natural numbers such that the Levenshtein distance between decimal representations of successive terms is 1, and a(n+1) is the largest such m < a(n) if it exists, or else the smallest such m > a(n); a(0) = 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 79, 78, 77
Offset: 0

Views

Author

Reinhard Zumkeller, May 01 2006

Keywords

Comments

a(n) = A003100(n) for n <= 100, a(100) = A003100(100) = 190, but a(101) = 180, A003100(101) = 191.
A118763 is the lexicographically smallest permutation with LevenshteinDistance[Base10](a(n),a(n+1)) = 1. - M. F. Hasler, Sep 12 2018

Crossrefs

Cf. A118763.
Iterated twice: A118759(n) := a(a(n)).
Fixed points: A118761 = { n | n = a(n) }.
Inverse: A118758.
First difference: A118762(n) := a(n+1) - a(n).

Formula

a(n+1) = if U(n) is empty then Min(V(n)) else Max(U(n)), where the sets U and V are defined as: U(m) = {x < a(m) : LD10(a(m),x) = 1 and a(k) <> x for 0 <= k < m}, V(m) = {x > a(m) | LD10(a(m),x) = 1 and a(k) <> x for 0 <= k < m} with LD10 = Levenshtein distance in decimal representations of natural numbers.
a(n) = A118758(n) (self-inverse) for n < 100.

Extensions

Correct definition and other edits by M. F. Hasler, Sep 12 2018

A118766 A118764(A118764(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19, 10, 11, 22, 23, 24, 25, 26, 27, 28, 20, 21, 29, 32, 33, 34, 35, 36, 37, 38, 39, 30, 31, 42, 43, 44, 45, 46, 47, 48, 40, 41, 49, 52, 53, 54, 55, 56, 57, 58, 59, 50, 51, 62, 63, 64, 65, 66, 67, 68, 60, 61, 69, 72, 73, 74
Offset: 0

Views

Author

Reinhard Zumkeller, May 01 2006

Keywords

Comments

Inverse integer permutation of A118765;
A118763(a(n)) = a(A118763(n)) = A118764(n).

Crossrefs

Cf. A118765.

A367812 Lexicographically earliest sequence of distinct nonnegative terms such that the Levenshtein distance (Ld) between a(n) and a(n+1) is equal to 2.

Original entry on oeis.org

0, 11, 2, 10, 3, 12, 4, 13, 5, 14, 6, 15, 7, 16, 8, 17, 9, 18, 20, 1, 22, 19, 21, 30, 23, 31, 24, 32, 25, 33, 26, 34, 27, 35, 28, 36, 29, 37, 40, 38, 41, 39, 42, 50, 43, 51, 44, 52, 45, 53, 46, 54, 47, 55, 48, 56, 49, 57, 60, 58, 61, 59, 62, 70, 63, 71, 64, 72, 65, 73, 66, 74, 67, 75, 68, 76, 69, 77, 80, 78
Offset: 1

Views

Author

Keywords

Examples

			a(1) =  0 and a(2) = 11 are separated by an Ld of 2
a(2) = 11 and a(3) =  2 are separated by an Ld of 2
a(3) =  2 and a(4) = 10 are separated by an Ld of 2
a(4) = 10 and a(5) =  3 are separated by an Ld of 2, etc.
		

Crossrefs

Programs

  • Mathematica
    a[1]=0;a[n_]:=a[n]=(k=1;While[MemberQ[Array[a,n-1],k]||EditDistance[ToString@a[n-1],ToString@k]!=2,k++];k);Array[a,80]
  • Python
    from itertools import islice
    from Levenshtein import distance as Ld
    def agen(): # generator of terms
        an, aset, mink = 0, {0}, 1
        while True:
            yield an
            s, k = str(an), mink
            while k in aset or Ld(s, str(k)) != 2: k += 1
            an = k
            aset.add(k)
            while mink in aset: mink += 1
    print(list(islice(agen(), 80))) # Michael S. Branicky, Dec 01 2023

A367813 Lexicographically earliest sequence of distinct nonnegative terms such that the Levenshtein distance (Ld) between a(n) and a(n+1) is equal to 3.

Original entry on oeis.org

0, 111, 2, 100, 3, 101, 4, 102, 5, 103, 6, 104, 7, 105, 8, 106, 9, 107, 21, 108, 22, 109, 23, 110, 24, 112, 20, 113, 25, 114, 26, 115, 27, 116, 28, 117, 29, 118, 30, 119, 32, 140, 31, 120, 33, 121, 34, 122, 35, 123, 36, 124, 37, 125, 38, 126, 39, 127, 40, 128, 41, 129, 43, 150, 42, 130, 44, 131, 45, 132, 46, 133
Offset: 1

Views

Author

Keywords

Examples

			a(1) =   0 and a(2) = 111 are separated by a Ld of 3
a(2) = 111 and a(3) =   2 are separated by a Ld of 3
a(3) =   2 and a(4) = 100 are separated by a Ld of 3
a(4) = 100 and a(5) =   3 are separated by a Ld of 3, etc.
		

Crossrefs

Programs

  • Mathematica
    a[1]=0;a[n_]:=a[n]=(k=1;While[MemberQ[Array[a,n-1],k]||EditDistance[ToString@a[n-1],ToString@k]!=3,k++];k);Array[a,72]
  • Python
    from itertools import islice
    from Levenshtein import distance as Ld
    def agen(): # generator of terms
        an, aset, mink = 0, {0}, 1
        while True:
            yield an
            s, k = str(an), mink
            while k in aset or Ld(s, str(k)) != 3: k += 1
            an = k
            aset.add(k)
            while mink in aset: mink += 1
    print(list(islice(agen(), 72))) # Michael S. Branicky, Dec 01 2023

A367814 Lexicographically earliest sequence of distinct nonnegative terms such that the Levenshtein distance (Ld) between a(n) and a(n+1) is equal to 4.

Original entry on oeis.org

0, 1111, 2, 1000, 3, 1001, 4, 1002, 5, 1003, 6, 1004, 7, 1005, 8, 1006, 9, 1007, 21, 1008, 22, 1009, 23, 1010, 24, 1011, 25, 1012, 26, 1013, 27, 1014, 28, 1015, 29, 1016, 32, 1017, 33, 1018, 34, 1019, 35, 1020, 31, 1022, 36, 1021, 37, 1023, 38, 1024, 39, 1025, 41, 1026, 43, 1027, 44, 1028, 45, 1029, 46, 1030
Offset: 1

Views

Author

Keywords

Examples

			a(1) =    0 and a(2) = 1111 are separated by an Ld of 4
a(2) = 1111 and a(3) =    2 are separated by an Ld of 4
a(3) =    2 and a(4) = 1000 are separated by an Ld of 4
a(4) = 1000 and a(5) =    3 are separated by an Ld of 4, etc.
		

Crossrefs

Programs

  • Mathematica
    a[1]=0;a[n_]:=a[n]=(k=1;While[MemberQ[Array[a,n-1],k]||EditDistance[ToString@a[n-1],ToString@k]!=4,k++];k);Array[a,64]
  • Python
    from itertools import islice
    from Levenshtein import distance as Ld
    def agen(): # generator of terms
        an, aset, mink = 0, {0}, 1
        while True:
            yield an
            s, k = str(an), mink
            while k in aset or Ld(s, str(k)) != 4: k += 1
            an = k
            aset.add(k)
            while mink in aset: mink += 1
    print(list(islice(agen(), 64))) # Michael S. Branicky, Dec 01 2023

A367815 Lexicographically earliest sequence of distinct nonnegative terms such that the Levenshtein distance (Ld) between a(n) and a(n+1) is equal to 5.

Original entry on oeis.org

0, 11111, 2, 10000, 3, 10001, 4, 10002, 5, 10003, 6, 10004, 7, 10005, 8, 10006, 9, 10007, 21, 10008, 22, 10009, 23, 10010, 24, 10011, 25, 10012, 26, 10013, 27, 10014, 28, 10015, 29, 10016, 32, 10017, 33, 10018, 34, 10019, 35, 10020, 31, 10022, 36, 10021, 37, 10023, 38, 10024, 39, 10025, 41, 10026, 43
Offset: 1

Views

Author

Keywords

Examples

			a(1) =     0 and a(2) = 11111 are separated by an Ld of 5
a(2) = 11111 and a(3) = 1   2 are separated by an Ld of 5
a(3) =     2 and a(4) = 10000 are separated by an Ld of 5
a(4) = 10000 and a(5) =     3 are separated by an Ld of 5, etc.
		

Crossrefs

Programs

  • Mathematica
    a[1]=0;a[n_]:=a[n]=(k=1;While[MemberQ[Array[a,n-1],k]||EditDistance[ToString@a[n-1],ToString@k]!=5,k++];k);Array[a,57]
  • Python
    from itertools import islice
    from Levenshtein import distance as Ld
    def agen(): # generator of terms
        an, aset, mink = 0, {0}, 1
        while True:
            yield an
            s, k = str(an), mink
            while k in aset or Ld(s, str(k)) != 5: k += 1
            an = k
            aset.add(k)
            while mink in aset: mink += 1
    print(list(islice(agen(), 57))) # Michael S. Branicky, Dec 01 2023
Showing 1-10 of 13 results. Next