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.

A332864 Lexicographically earliest sequence of positive integers with the property that the distance between the first appearance of n and the first appearance of n+1 is a(n).

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 1, 5, 1, 1, 1, 6, 7, 8, 1, 1, 1, 1, 9, 10, 11, 12, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 14, 1, 1, 1, 1, 1, 1, 1, 15, 16, 17, 18, 19, 1, 1, 1, 1, 1, 1, 1, 1, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 22, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 24, 25, 26, 27, 28
Offset: 1

Views

Author

Samuel B. Reid, Feb 27 2020

Keywords

Crossrefs

Programs

  • C
    See Links section.
    
  • Python
    a = [1]
    for n in range(1, 30):
        a += [1] * (a[n-1]-1)
        a.append(n+1)
    print(a)
    # Andrey Zabolotskiy, Feb 28 2020