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 A361915 #11 Jun 16 2023 13:43:39 %S A361915 13,113,1069,5051,18553,44417,99439,190921,356351,603149,933073, %T A361915 1416223,2044201,2856559,3957883,5379287,7093217,9113263,11693687, %U A361915 14701529,18345209,22758829,27879563,33938257,40808759,48364003,57099061,67292237,78919781,92417891 %N A361915 a(n) is the smallest prime p such that, for m >= nextprime(p), there are more composites than primes in the range [2, m], where multiples of primes prime(1) through prime(n) are excluded. %e A361915 The number of primes, N_p, and the number of composite, N_c, in the range [2, m] are listed in the table below, where N_p = N_c occurs at m = 9, 11 and 13. For m >= nextprime(13) = 17, N_c > N_p. So, a(0) = 13 is the case for n = 0, in which none of the multiples of primes is excluded from the integer list. %e A361915 m: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ... %e A361915 N_p: 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, ... %e A361915 N_c: 0, 0, 1, 1, 2, 2, 3, 4, 5, 5, 6, 6, 7, 8, 9, 9, ... %e A361915 If the multiples of prime(1) are excluded from the list, 113 is the smallest prime such that N_c > N_p for m >= nextprime(113) = 127 and, thus, a(1) = 113 (see below). %e A361915 m: 3, 5, 7, ..., 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, ... %e A361915 N_p: 1, 2, 3, ..., 23, 23, 24, 24, 25, 26, 26, 27, 28, 28, 29, 29, ... %e A361915 N_c: 0, 0, 0, ..., 23, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 28, ... %e A361915 If multiples of prime(1) and prime(2) are excluded, a(2) = 1069. If multiples of prime(1), prime(2) and prime(3) are excluded, a(3) = 5051. %o A361915 (Python) %o A361915 from sympy import isprime, prime %o A361915 R = []; L = [x for x in range(2, 100000001)] %o A361915 for n in range(30): %o A361915 np = 0; nc = 0; found = 0 %o A361915 if n > 0: q = prime(n); L = [x for x in L if x%q != 0] %o A361915 for m in L: %o A361915 if isprime(m): np += 1; p = m %o A361915 else: nc += 1 %o A361915 if np == nc: Lp = p; found = 1 %o A361915 if found: R.append(Lp) %o A361915 print(*R, sep = ", ") %Y A361915 Cf. A000040, A002808, A072731, A097454. %K A361915 nonn %O A361915 0,1 %A A361915 _Ya-Ping Lu_, Mar 29 2023