OFFSET
1,1
EXAMPLE
a(5) = 242 because 241 is a prime, 247=13*19 is a semiprime, none of the 5 consecutive integers between them are primes or semiprimes (242 = 2*11^2, 243 = 3^5, 244 = 2^2*61, 245 = 5*7^2, and 246 = 2*3*41), and there is no smaller run of exactly 5 consecutive integers that are neither prime nor semiprime.
MATHEMATICA
Module[{nn=48*10^6, lst}, lst=Table[Which[PrimeQ[n], 1, PrimeOmega[n]==2, 1, True, 0], {n, nn}]; Flatten[Table[SequencePosition[lst, Join[{1}, PadRight[{}, n, 0], {1}], 1], {n, 34}], 1]][[;; , 1]]+1 (* Harvey P. Dale, May 30 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon E. Schoenfield, May 22 2021
EXTENSIONS
Corrected by Harvey P. Dale, May 30 2024
STATUS
approved