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

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

Views

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.

A372407 a(n) = smallest prime not occurring earlier having in decimal representation to its predecessor Levenshtein distance = 1.

Original entry on oeis.org

2, 3, 5, 7, 17, 11, 13, 19, 29, 23, 43, 41, 31, 37, 47, 67, 61, 71, 73, 53, 59, 79, 89, 83, 283, 223, 227, 127, 107, 101, 103, 109, 139, 131, 137, 157, 151, 181, 191, 193, 113, 163, 167, 197, 97, 397, 307, 317, 311, 211, 241, 251, 257, 277, 271, 281, 881, 811, 821, 421, 401, 409, 419, 439
Offset: 1

Views

Author

Keywords

Comments

The sequence is a permutation of the prime numbers.

Examples

			The Levenshtein distance = 1 between 2 and 3, 3 and 5, 5 and 7, 7 and 17, 17 and 11, 11 and 13, etc.
No smaller prime than 17 was possible for a(5).
		

Crossrefs

Programs

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

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

Original entry on oeis.org

1, 4, 6, 8, 9, 39, 30, 10, 12, 14, 15, 16, 18, 28, 20, 21, 22, 24, 25, 26, 27, 57, 50, 40, 42, 32, 33, 34, 35, 36, 38, 48, 44, 45, 46, 49, 69, 60, 62, 52, 51, 54, 55, 56, 58, 68, 63, 64, 65, 66, 76, 70, 72, 74, 75, 77, 78, 88, 80, 81, 82, 84, 85, 86, 87, 187, 117, 110, 100, 102, 104, 105, 106, 108, 118, 111, 112
Offset: 1

Views

Author

Keywords

Comments

The sequence is a permutation of the nonprimes.

Examples

			The Levenshtein distance = 1 between 1 and 4, 4 and 6, 6 and 8, 8 and 9, 9 and 39, 39 and 30, 30 and 10, etc.
No smaller composite than 39 was possible for a(6).
		

Crossrefs

Programs

  • Mathematica
    a[1]=1;a[n_]:=a[n]=(k=2;While[PrimeQ@k||MemberQ[Array[a,n-1],k]|| EditDistance[ToString@k,ToString@a[n-1]]!=1,k++];k);Array[a,77]
  • Python
    from sympy import isprime
    from itertools import islice
    from Levenshtein import distance as Ld
    def agen(): # generator of terms
        an, aset, mink = 1, {1}, 4
        while True:
            yield an
            s, k = str(an), mink
            while k in aset or Ld(s, str(k)) != 1 or isprime(k): k += 1
            an = k
            aset.add(k)
            while mink in aset or isprime(mink): mink += 1
    print(list(islice(agen(), 80))) # Michael S. Branicky, Apr 29 2024
Previous Showing 11-13 of 13 results.