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

A337159 Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, A033307(n + a(n)) = A033307(n).

Original entry on oeis.org

0, 13, 14, 15, 16, 17, 18, 19, 20, 2, 40, 1, 3, 4, 21, 6, 33, 8, 51, 53, 60, 11, 80, 9, 100, 7, 120, 5, 140, 10, 160, 12, 157, 41, 163, 39, 23, 37, 31, 35, 49, 73, 67, 71, 85, 29, 103, 27, 121, 47, 141, 25, 137, 43, 143, 61, 144, 59, 145, 57, 45, 55, 63, 93
Offset: 0

Views

Author

Rémy Sigrist, Jan 30 2021

Keywords

Comments

This sequence is a permutation of the nonnegative integers: repunits induce runs of consecutive equal terms of arbitrary size in A033307, thus allowing any value to eventually occur.

Crossrefs

Programs

  • PARI
    See Links section.
    
  • Python
    def aupton(terms):
      alst, A033307, last, used, n, an = [], '1', 1, set(), 0, 0
      while n <= terms:
        while an in used: an += 1
        while len(A033307) <= n + an: last += 1; A033307 += str(last)
        if A033307[n + an] == A033307[n]:
          alst += [an]; used.add(an); n += 1; an = 0
        else: an += 1
      return alst
    print(aupton(63)) # Michael S. Branicky, Jan 30 2021
Showing 1-1 of 1 results.