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

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

A381894 Lexicographically earliest sequence of positive integers such that a(n) is the length of the n-th run of consecutive, equal terms and no two runs have the same sum.

Original entry on oeis.org

1, 2, 2, 1, 1, 3, 5, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 3, 3, 3, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 11, 11, 11, 13, 13, 13, 15, 15, 15, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9
Offset: 1

Views

Author

Neal Gersh Tolunsky, Mar 09 2025

Keywords

Examples

			a(6) = 3 because the 4th run must have length a(4) = 1, and the potential runs 1 and 2 have the same sum as a run already in the sequence (namely 1 and 1,1). So a(6) = 3 since no run has appeared with a sum of 3 thus far.
		

Crossrefs

A382028 Lexicographically earliest sequence of positive integers such that a(n) is the length of the n-th run of consecutive, equal terms and no two runs have the same product.

Original entry on oeis.org

1, 2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 4, 4, 4, 5, 5, 5, 6, 6, 6, 3, 3, 3, 3, 4, 4, 4, 4, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5
Offset: 1

Views

Author

Neal Gersh Tolunsky, Mar 12 2025

Keywords

Examples

			a(12)..a(13) = 4: This is the 6th run. a(6) = 2, so the 6th run has length 2. We cannot use 1 as any run of 1s would have the same product as the first run a(1) = 1. Runs of length 2 made of 2s and 3s have already occurred, so a(12)..a(13) = 4.
a(27)..a(30) = 3: This is the 12th run. a(12) = 4, so the 12th run has length 4. We cannot use 1 for the same reason mentioned above. We cannot have 2 because a run of four 2s has product 16, which would be the same as that of the 6th run of two 4s. So a(27)..a(30) = 3, a run whose product has not occurred before in a previous run.
		

Crossrefs

Showing 1-3 of 3 results.