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 10 results.

A118758 Inverse of A118757.

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

Permutation of the natural numbers with fixed points A118761: a(A118761(n)) = A118761(n);
A118760(n) = a(a(n)); a(n) = A118757(n) for n < 100.

Crossrefs

Cf. A118764.

A118761 Fixed points of permutations A118757, A118758, A118759 and A118760.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 119, 138, 157, 176, 195, 310, 339, 358, 377, 396, 559, 578, 597, 779, 798, 999, 3130
Offset: 1

Views

Author

Reinhard Zumkeller, May 01 2006

Keywords

Comments

A118757(a(n)) = A118758(a(n)) = A118759(a(n)) = A118760(a(n)) = a(n);
a(n) = A024657(n-1) = A102491(n) for n<=50.

Crossrefs

Cf. A118767.

A118759 A118757(A118757(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 189
Offset: 0

Views

Author

Reinhard Zumkeller, May 01 2006

Keywords

Comments

Inverse integer permutation of A118760; a(n)=A118760(n)=n for n<100, but a(100)=189 and A118760(100)=118; A118758(a(n))=a(A118758(n))=A118757(n).

Crossrefs

Cf. A118760.

Extensions

More terms from Charles R Greathouse IV, Sep 18 2015

A118762 First differences of A118757.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1
Offset: 1

Views

Author

Reinhard Zumkeller, May 01 2006

Keywords

Comments

a(10^k-1) = 10^k for 0
abs(a(n)) = 10^k not for all n: e.g. a(1155) = A118757(1156) - A118757(1155) = 1123 - 1121 = 2.

Crossrefs

Cf. A118768.

A118763 a(n) = smallest number not occurring earlier having in decimal representation to its predecessor Levenshtein distance = 1; a(0)=0.

Original entry on oeis.org

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

Author

Reinhard Zumkeller, May 01 2006

Keywords

Comments

Permutation of the natural numbers; inverse: A118764; A118765(n)=a(a(n)); a(A118767(n))=A118767(n);
A118768(n) = a(n+1) - a(n);

Crossrefs

Cf. A118757.

Programs

  • Mathematica
    levenshtein[s_List, t_List] := Module[{d, n = Length@ s, m = Length@ t}, Which[s === t, 0, n == 0, m, m == 0, n, s != t, d = Table[0, {m + 1}, {n + 1}]; d[[1, Range[n + 1]]] = Range[0, n]; d[[Range[m + 1], 1]] = Range[0, m]; Do[ d[[j + 1, i + 1]] = Min[d[[j, i + 1]] + 1, d[[j + 1, i]] + 1, d[[j, i]] + If[ s[[i]] === t[[j]], 0, 1]], {j, m}, {i, n}]; d[[ -1, -1]] ]]; f[lst_] :=  Block[{k = 1, l = IntegerDigits[ lst[[-1]]]}, While[ MemberQ[lst, k] || levenshtein[l, IntegerDigits[k]] > 1, k++]; Append[lst, k]]; Nest[f, {0}, 100] (* Robert G. Wilson v, Sep 22 2016 *)
  • 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)) != 1: k += 1
            an = k
            aset.add(k)
            while mink in aset: mink += 1
    print(list(islice(agen(), 73))) # Michael S. Branicky, Dec 01 2023

A003100 Decimal Gray code for n.

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

Keywords

Comments

This permutation of the nonnegative integers is not self-inverse, as previously claimed. The first exception is a(100) = 190, but a(190) = 109. - Franklin T. Adams-Watters, Mar 05 2010
a(n) = A118757(n) for n<=100, = a(100)=A118757(100)=190, but a(101)=191, A118757(101)=180. - Reinhard Zumkeller, May 01 2006

References

  • M. Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 18.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Inverse is A174025.

Programs

  • Maple
    A003100 :=proc(n)
        local s,i:
        s:=[op(convert(n,base,10)),0]:
        add(piecewise(s[i+1] mod 2=0,s[i],9-s[i])*10^(i-1),i=1..nops(s)-1) :
    end proc:
    seq(A003100(j),j=0..100); # Pab Ter, Oct 14 2005

Extensions

More terms from Pab Ter (pabrlos2(AT)yahoo.com), Oct 14 2005
Incorrect comment replaced by Franklin T. Adams-Watters, Mar 05 2010

A118760 A118758(A118758(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 118, 108, 127, 126
Offset: 0

Author

Reinhard Zumkeller, May 01 2006

Keywords

Comments

Inverse integer permutation of A118759; a(n)=A118759(n) for n<100; A118757(a(n))=a(A118757(n))=A118758(n).

Crossrefs

Cf. A118759.

A261725 Lexicographically earliest sequence of distinct terms such that the absolute difference of two successive terms is a power of 10, and can be computed without carry.

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

Author

Paul Tek, Aug 30 2015

Keywords

Comments

In base 10, two successive terms have the same representation, except for one position, where the digits differ from exactly one unit. This difference can occur on a leading zero.
Conjectured to be a permutation of the nonnegative integers. See A261729 for putative inverse.
a(n) = A003100(n) for n < 101, but a(101) = 180, A003100(101) = 191.
a(n) = A118757(n) for n < 201, but a(201) = 281, A118757(201) = 290.
a(n) = A118758(n) for n < 100, but a(100) = 190, A118758(100) = 109.
a(n) = A174025(n) for n < 100, but a(100) = 190, A174025(100) = 199.
a(n) = A261729(n) for n < 100, but a(100) = 190, A261729(100) = 109.

Crossrefs

Cf. A003100, A118757, A118763, A163252, A261729 (putative inverse).

Programs

  • Perl
    See Links section.

A261729 Putative inverse of conjectured permutation in A261725.

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

Author

Paul Tek, Aug 30 2015

Keywords

Comments

a(n) = A003100(n) for n < 100, but a(100) = 109, A003100(100) = 190.
a(n) = A118757(n) for n < 100, but a(100) = 109, A118757(100) = 190.
a(n) = A118758(n) for n < 201, but a(201) = 209, A118758(201) = 211.
a(n) = A174025(n) for n < 100, but a(100) = 109, A174025(100) = 199.
a(n) = A261725(n) for n < 100, but a(100) = 109, A261725(100) = 190.

Crossrefs

Cf. A261725.

A367638 Sequence S of positive integers such that the successive digits d of S are the successive Levenshtein distances between two adjacent terms of S. When possible, S is always extended with the smallest positive integer not yet present.

Original entry on oeis.org

1, 2, 10, 11, 11, 12, 13, 3, 4, 5, 14, 15, 200, 6, 1000, 22111, 2111, 7, 8, 10000, 100, 100, 100, 222211, 22211, 22211, 22211, 22211, 211, 16, 17, 18, 19, 20, 21, 22, 23, 1000000, 22111111, 2111111, 2111111, 2111111, 2111111, 2111111, 111111, 111111, 111111, 11111, 11111, 11111, 1111, 1111, 1111, 101, 30, 9, 24
Offset: 1

Author

Keywords

Examples

			The sequence starts with 1, 2, 10, 11, 11, 12, 13, 3.
a(1) = 1 is indeed the Ld (Levenshtein distance) between a(1) = 1 and a(2) = 2;
a(2) = 2 is the Ld between a(2) = 2 and a(3) = 10;
a(3) = 10 whose first digit 1 is the Ld between a(3) = 10 and a(4) = 11;
a(3) = 10 whose second digit 0 is the Ld between a(4) = 11 and a(5) = 11;
a(4) = 11 whose first digit 1 is the Ld between a(5) = 11 and a(6) = 12;
a(4) = 11 whose second digit 1 is the Ld between a(6) = 12 and a(7) = 13;
a(5) = 11 whose first digit 1 is the Ld between a(7) = 13 and a(8) = 3; etc.
		

Crossrefs

Programs

  • Mathematica
    a[1]=1;a[n_]:=a[n]=If[Flatten[IntegerDigits/@(ar=Array[a,n-1])][[n-1]]==0,a[n-1],(k=1;While[MemberQ[ar,k]||EditDistance[ToString@a[n-1],ToString@k]!=Flatten[IntegerDigits/@Join[ar,{k}]][[n-1]],k++];k)];Array[a,23]
Showing 1-10 of 10 results.