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.
%I A366868 #10 Oct 26 2023 10:26:30 %S A366868 0,1,0,1,6,1,6,15,24,29,22,1,0,7,6,11,48,109,0,7,66,155,54,21,16,11 %N A366868 a(n) = A366470(A366864(n)-1). %C A366868 Terms of A366470 at the end of a segment. Some values, e.g. 0, 1, 6, 7, 11, occur multiple times. Will they occur infinitely often? %o A366868 (Python) %o A366868 from itertools import count, islice %o A366868 from sympy import nextprime %o A366868 def A366868_gen(): # generator of terms %o A366868 a, aset, p = 1, {0,1}, 2 %o A366868 for i in count(3): %o A366868 for b in count(a,p): %o A366868 if b not in aset: %o A366868 aset.add(b) %o A366868 c = b%(p:=nextprime(p)) %o A366868 if c > a: %o A366868 yield a %o A366868 a = c %o A366868 break %o A366868 A366868_list = list(islice(A366868_gen(),20)) %Y A366868 Cf. A364054, A366470, A366864, A366869. %K A366868 nonn,more %O A366868 1,5 %A A366868 _Chai Wah Wu_, Oct 25 2023