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 A376750 #19 Oct 07 2024 14:17:37 %S A376750 2,9,23,52,110,231,472,965,1958,3962,7980,16029,32181,64597,129574, %T A376750 259798,520835,1043833,2091473,4190135,8392863,16809322,33661860, %U A376750 67402676,134952624,270177158,540861852,1082667610,2167106199,4337519113,8681255531,17374202846,34770433922,69582458821,139243546013,278635987083 %N A376750 Indices n where a run of primes begins in A376198. %o A376750 (Python) %o A376750 from itertools import count, islice %o A376750 from sympy import isprime, nextprime %o A376750 def A376750_4gen(): # generator of terms for A376750..4 %o A376750 an, smc, smp = 2, 4, 3, %o A376750 wasprime = startp = startn = endp = endn = rl = 0 %o A376750 for n in count(2): %o A376750 if not isprime(an): %o A376750 if wasprime: # a run has ended %o A376750 endn, endp = n-1, wasprime %o A376750 yield startn, startp, endn, endp, rl %o A376750 an = smp if an == 2*smp else smc %o A376750 wasprime = 0 # False %o A376750 else: %o A376750 if not wasprime: # a run has started %o A376750 startn, startp, rl = n, an, 1 %o A376750 else: rl += 1 %o A376750 wasprime = an %o A376750 an = smp if smp < smc else smc %o A376750 if an == smp: smp = nextprime(smp) %o A376750 else: %o A376750 smc += 1 %o A376750 while isprime(smc): smc += 1 %o A376750 print([out[0] for out in list(islice(A376750_4gen(), 15))]) # _Michael S. Branicky_, Oct 03 2024 %Y A376750 Cf. A376198-A376201, A376751-A376754. %K A376750 nonn %O A376750 1,1 %A A376750 _N. J. A. Sloane_, Oct 03 2024 %E A376750 a(14)-a(33) from _Michael S. Branicky_, Oct 04 2024 %E A376750 a(34)-a(36) from _Michael S. Branicky_, Oct 07 2024