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 A376199 #9 Oct 04 2024 00:55:42 %S A376199 1,2,3,4,9,5,10,6,7,8,11,12,23,13,14,15,24,16,25,17,18,19,26,20,21,22, %T A376199 27,28,52,29,53,30,31,32,33,34,54,35,36,37,55,38,56,39,40,41,57,42,43, %U A376199 44,45,46,58,47,48,49,50,51,59,60,110,61,62,63,64,65,111,66,67,68,112,69,113,70,71,72,73,74,114,75,76,77,115,78,79 %N A376199 Index where n appears in A376198. %H A376199 Michael S. Branicky, <a href="/A376199/b376199.txt">Table of n, a(n) for n = 1..100000</a> %o A376199 (Python) %o A376199 from itertools import count, islice %o A376199 from sympy import isprime, nextprime %o A376199 def agen(): # generator of terms %o A376199 an, smc, smp, adict, n = 2, 4, 3, {1: 1, 2: 2}, 1 %o A376199 for k in count(3): %o A376199 if not isprime(an): %o A376199 an = smp if an == 2*smp else smc %o A376199 else: %o A376199 an = smp if smp < smc else smc %o A376199 if an == smp: smp = nextprime(smp) %o A376199 else: %o A376199 smc += 1 %o A376199 while isprime(smc): smc += 1 %o A376199 if an not in adict: adict[an] = k %o A376199 while n in adict: yield adict[n]; n += 1 %o A376199 print(list(islice(agen(), 85))) # _Michael S. Branicky_, Oct 03 2024 %Y A376199 Cf. A376198, A376200-A376201, A376750-A376754. %K A376199 nonn %O A376199 1,2 %A A376199 _N. J. A. Sloane_, Oct 03 2024