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.

A377094 Inverse permutation to A377093.

Original entry on oeis.org

1, 2, 4, 3, 7, 5, 12, 19, 6, 8, 27, 38, 50, 13, 9, 20, 63, 80, 98, 10, 14, 28, 117, 21, 11, 51, 140, 15, 167, 196, 226, 22, 29, 64, 16, 39, 257, 99, 52, 23, 294, 17, 335, 30, 378, 118, 423, 24, 18, 470, 65, 53, 520, 81, 31, 25, 100, 168, 573, 40, 632, 227, 693
Offset: 1

Views

Author

Rémy Sigrist, Oct 16 2024

Keywords

Examples

			A377093(42) = 84, so a(84) = 42.
		

Crossrefs

Cf. A377093.

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms; uses A377093gen() in A377093
        adict, n = dict(), 1
        for k, v in enumerate(A377093gen(), 1):
            if v not in adict:
                adict[v] = k
                while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 63))) # Michael S. Branicky, Oct 16 2024

Formula

a(n) <= (n-1)*n/2 + 1. - Michael S. Branicky, Oct 16 2024

A376903 Lexicographically earliest sequence of distinct positive integers with a(1) multiples of 1 followed by a(2) multiples of 2 etc.

Original entry on oeis.org

1, 2, 4, 3, 6, 9, 12, 8, 16, 20, 5, 10, 15, 25, 30, 35, 18, 24, 36, 42, 48, 54, 60, 66, 72, 7, 14, 21, 28, 49, 56, 63, 70, 77, 84, 91, 98, 32, 40, 64, 80, 88, 96, 104, 112, 27, 45, 81, 90, 99, 108, 117, 126, 135, 144, 153, 162, 171, 180, 189, 198, 50, 100, 110, 120
Offset: 1

Views

Author

Rémy Sigrist, Oct 08 2024

Keywords

Comments

This sequence combines features of Golomb's sequence (A001462) and A075383.
This sequence is a permutation of the positive integers with inverse A376904.
This sequence can also be seen as an irregular table whose n-th row contains a(n) multiples of n.

Examples

			The first terms/rows are:
  n  a(n)  n-th row
  -  ----  ---------------------------------------------
  1     1  1
  2     2  2, 4
  3     4  3, 6, 9, 12
  4     3  8, 16, 20
  5     6  5, 10, 15, 25, 30, 35
  6     9  18, 24, 36, 42, 48, 54, 60, 66, 72
  7    12  7, 14, 21, 28, 49, 56, 63, 70, 77, 84, 91, 98
		

Crossrefs

Programs

  • PARI
    \\ See Links section.
    
  • Python
    from itertools import count, islice
    def A376903gen(): # generator of terms
        aset, alst = {1, 2, 4}, [1, 2, 4]
        yield from [1, 2, 4]
        for n in count(3):
            nlst = []
            for k in count(n, n):
                if k not in aset:
                    nlst.append(k)
                    if len(nlst) == alst[n-1]:
                        break
            yield from nlst
            alst.extend(nlst)
            aset.update(nlst)
    print(list(islice(A376903gen(), 100))) # Michael S. Branicky, Oct 16 2024

A376905 Lexicographically earliest sequence of distinct positive integers with a(1) multiples of a number b(1) followed by a(2) multiples of a number b(2) etc.

Original entry on oeis.org

1, 2, 4, 3, 6, 9, 12, 5, 10, 15, 7, 14, 21, 28, 35, 42, 8, 16, 24, 32, 40, 48, 56, 64, 72, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 13, 26, 39, 52, 65, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 18, 36, 54, 90, 108, 126, 144, 162, 180, 198, 216
Offset: 1

Views

Author

Rémy Sigrist, Oct 08 2024

Keywords

Comments

This sequence combines features of Golomb's sequence (A001462) and A361748.
This sequence is a permutation of the positive integers with inverse A376904.
This sequence can also be seen as an irregular table whose n-th row contains a(n) multiples of its leading term.

Examples

			The first terms/rows are:
  n  a(n)  b(n)  n-th row
  -  ----  ----  -------------------------------------------------
  1     1     1  1
  2     2     2  2, 4
  3     4     3  3, 6, 9, 12
  4     3     5  5, 10, 15
  5     6     7  7, 14, 21, 28, 35, 42
  6     9     8  8, 16, 24, 32, 40, 48, 56, 64, 72
  7    12    11  11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132
  8     5    13  13, 26, 39, 52, 65
  9    10    17  17, 34, 51, 68, 85, 102, 119, 136, 153, 170
		

Crossrefs

Programs

  • PARI
    \\ See Links section.
  • Python
    from itertools import count, islice
    def A376905gen(): # generator of terms
        aset, alst, m = {1, 2, 4}, [1, 2, 4], 3
        yield from [1, 2, 4]
        for n in count(3):
            nlst = []
            for k in count(m, m):
                if k not in aset:
                    nlst.append(k)
                    if len(nlst) == alst[n-1]:
                        break
            yield from nlst
            alst.extend(nlst)
            aset.update(nlst)
            while m in aset: m += 1
    print(list(islice(A376905gen(), 70))) # Michael S. Branicky, Oct 16 2024
    
Showing 1-3 of 3 results.