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.

A381137 Lexicographically earliest sequence of distinct positive integers such that no 3 terms are in harmonic progression.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 73, 74, 76, 79, 81, 82, 83, 85, 86
Offset: 1

Views

Author

Neal Gersh Tolunsky, Feb 15 2025

Keywords

Comments

A harmonic progression is a sequence of values whose reciprocals are in arithmetic progression. Equivalently, if (a, b, c) is a harmonic progression, then b is the harmonic mean of a and c.
a(n) is the smallest integer greater than a(n-1) which does not form a 3-term harmonic progression with 2 previously occurring terms.
Every prime occurs in the sequence.

Examples

			6 is not a term in the sequence because it would form a harmonic progression with 2 and 3, which occurred earlier. The progression (1/6, 1/3, 1/2) has common difference 1/6.
		

Crossrefs

Analogous sequences: A003278 (for arithmetic progressions), A000452 (for geometric progressions).

Programs

  • Python
    from itertools import count
    def A381137_generator():
        a_list = []
        forbidden = set()
        a = 0
        while 1:
            a = next(k for k in count(a+1) if k not in forbidden)
            yield a
            forbidden.update(a*b//m for b in a_list if (m:=2*b-a) > 0 and a*b%m == 0)
            a_list.append(a) # Pontus von Brömssen, Mar 04 2025