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.

A357378 Lexicographically earliest sequence of positive integers such that the values a(floor(n/2)) * a(n) are all distinct.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Sep 26 2022

Keywords

Comments

See A357379 for the corresponding products.
The sequence is well defined; we can always extend it with a value strictly greater than the square of the greatest value so far.
The sequence is unbounded (otherwise we could only have a finite number of products a(floor(n/2)) * a(n), and therefore a finite number of terms).
For any prime number p: the first term >= p is p.
All prime numbers appear in the sequence.
If a(n) is the first occurrence of some prime number p, then a(m) = 1 for some m in the interval floor(n/2)..2*n.
There are infinitely many 1's in the sequence; as a consequence, every positive integer appears in A357379.

Examples

			The first terms are:
  n   a(n)  a(floor(n/2))  a(floor(n/2))*a(n)
  --  ----  -------------  ------------------
   0     1              1                   1
   1     2              1                   2
   2     2              2                   4
   3     3              2                   6
   4     4              2                   8
   5     5              2                  10
   6     1              3                   3
   7     3              3                   9
   8     3              4                  12
   9     4              4                  16
  10     1              5                   5
  11     3              5                  15
  12     7              1                   7
		

Crossrefs

Cf. A050292 (additive variant), A357379.

Programs

  • C
    See Links section.
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        alst, disallowed = [1], {1}; yield 1
        for n in count(1):
            ahalf, k = alst[n//2], 1
            while ahalf*k in disallowed: k += 1
            an = k; yield an; alst.append(an); disallowed.add(ahalf*an)
    print(list(islice(agen(), 75))) # Michael S. Branicky, Sep 26 2022

Formula

a(2*n + 1) > a(2*n).