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.

A363301 a(1)=1, and thereafter, a(n) is the number of terms in the sequence thus far that appear with a frequency equal to or less than that of a(n-1).

This page as a plain text file.
%I A363301 #13 May 27 2023 11:48:45
%S A363301 1,1,2,1,4,2,3,2,8,3,4,5,2,13,3,11,4,13,5,6,3,21,4,23,5,13,14,6,7,6,
%T A363301 18,7,8,9,6,35,7,21,10,7,40,8,22,9,12,9,26,10,13,49,10,27,11,14,15,10,
%U A363301 56,11,30,12,17,12,34,13,64,14,37,15,18,19,14,66,15,40,20,15,71,16,17,24,17,44,18,46,19,24
%N A363301 a(1)=1, and thereafter, a(n) is the number of terms in the sequence thus far that appear with a frequency equal to or less than that of a(n-1).
%H A363301 Neal Gersh Tolunsky, <a href="/A363301/b363301.txt">Table of n, a(n) for n = 1..10000</a>
%H A363301 Neal Gersh Tolunsky, <a href="/A363301/a363301.png">Graph of the first 100000 terms</a>
%e A363301 a(3)=2 because a(2)=1 occurs with a frequency of 2 and there are two terms in the sequence thus far that appear with a frequency of 2 or less (1, 1).
%e A363301 a(6)=3 because a(5)=2 occurs with a frequency of 2 and there are three terms that appear with a frequency of 2 or less (2, 2, and 4).
%o A363301 (Python)
%o A363301 from itertools import islice
%o A363301 from collections import Counter
%o A363301 def agen(): # generator of terms
%o A363301     an, c, freqs = 1, Counter(), Counter()
%o A363301     while True:
%o A363301         if an in c:
%o A363301             freqs[c[an]] -= 1
%o A363301         c[an] += 1
%o A363301         freqs[c[an]] += 1
%o A363301         yield an
%o A363301         an = sum(v*freqs[v] for v in range(1, c[an]+1))
%o A363301 print(list(islice(agen(), 86))) # _Michael S. Branicky_, May 26 2023
%Y A363301 Cf. A350768.
%K A363301 nonn
%O A363301 1,3
%A A363301 _Neal Gersh Tolunsky_, May 26 2023