%I #31 Dec 01 2024 10:03:36
%S 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,
%T 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,
%U 10,10,10,10,10,10,10,10,14,14,14,14,14,14,14
%N a(n) = A307720(n) * A307720(n+1).
%C For all positive integers n, n appears n times.
%H Rémy Sigrist, <a href="/A307730/b307730.txt">Table of n, a(n) for n = 1..25000</a>
%H Rémy Sigrist, <a href="/A307730/a307730.png">Scatterplot of the first 10000000 terms</a>
%H Rémy Sigrist, <a href="/A307730/a307730.gp.txt">PARI program for A307730</a>
%H N. J. A. Sloane, <a href="/A307730/a307730_1.txt">Table of n, a(n) for n = 1..999999</a>
%e The first terms in this sequence and in A307720 are:
%e n a(n) A307720(n)
%e -- ---- ----------
%e 1 1 1
%e 2 2 1
%e 3 2 2
%e 4 3 1
%e 5 3 3
%e 6 3 1
%e 7 6 3
%e 8 4 2
%e 9 4 2
%e 10 4 2
%o (PARI) \\ See Links section.
%o (Python)
%o from itertools import islice
%o from collections import Counter
%o def A307730(): # generator of terms. Greedy algorithm
%o c, b = Counter(), 1
%o while True:
%o k, kb = 1, b
%o while c[kb] >= kb:
%o k += 1
%o kb += b
%o c[kb] += 1
%o b = k
%o yield kb
%o A307730_list = list(islice(A307730(),100)) # _Chai Wah Wu_, Oct 21 2021
%Y Cf. A002024, A088178, A307720.
%Y Cf. A348579 (indices of occurrence of each number), A348246 (first occurrence of each number), A348409 (last occurrence).
%K nonn,hear
%O 1,2
%A _Rémy Sigrist_, Apr 25 2019