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.

A307730 a(n) = A307720(n) * A307720(n+1).

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 6, 4, 4, 4, 4, 6, 6, 6, 6, 6, 9, 9, 9, 9, 9, 9, 9, 9, 9, 12, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 15, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 14, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 14, 14, 14, 14, 14, 14, 14
Offset: 1

Views

Author

Rémy Sigrist, Apr 25 2019

Keywords

Comments

For all positive integers n, n appears n times.

Examples

			The first terms in this sequence and in A307720 are:
  n   a(n)  A307720(n)
  --  ----  ----------
   1     1           1
   2     2           1
   3     2           2
   4     3           1
   5     3           3
   6     3           1
   7     6           3
   8     4           2
   9     4           2
  10     4           2
		

Crossrefs

Cf. A348579 (indices of occurrence of each number), A348246 (first occurrence of each number), A348409 (last occurrence).

Programs

  • PARI
    \\ See Links section.
    
  • Python
    from itertools import islice
    from collections import Counter
    def A307730(): # generator of terms. Greedy algorithm
        c, b = Counter(), 1
        while True:
            k, kb = 1, b
            while c[kb] >= kb:
                k += 1
                kb += b
            c[kb] += 1
            b = k
            yield kb
    A307730_list = list(islice(A307730(),100)) # Chai Wah Wu, Oct 21 2021