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 A376332 #15 Nov 07 2024 04:34:27 %S A376332 5,11,16,135,135,923,6083,71663,423959,3995879,43216583,489118019, %T A376332 6233987183,87199150463,1310334397523,20937254735843,355693511854763 %N A376332 a(n) is the least k such that k - i! is a semiprime for all i from 1 to n. %C A376332 a(n) == 3 (mod 4) for n > 3. %C A376332 a(18) > 6 * 10^11 + 18!, if it exists. - _Daniel Suteu_, Oct 24 2024 %e A376332 a(5) = 135 because 135 - 1! = 134 = 2*67, 135 - 2! = 133 = 7 * 19, 135 - 3! = 129 = 3 * 43, 135 - 4! = 111 = 3 * 39 and 135 - 5! = 15 = 3 * 5 are all semiprimes, and no number smaller than 135 works. %p A376332 f:= proc(n) local F, k,i; %p A376332 F:= [seq(i!,i=1..n)]; %p A376332 for k from n! + 4 do %p A376332 if andmap(t -> numtheory:-bigomega(k-t) = 2, F) then return k fi %p A376332 od %p A376332 end proc: %p A376332 map(f, [$1..13]); %t A376332 a[n_]:=Module[{k=n!+1}, While[Product[Boole[PrimeOmega[k-i!]==2], {i,n}]!=1, k++]; k]; Array[a,9] (* _Stefano Spezia_, Sep 20 2024 *) %o A376332 (PARI) a(n) = if(n <= 3, return([5,11,16][n])); my(N=n!, F=vector(n, i, (n - i + 1)!)); forprime(p = N>>1, oo, my(k=2*p+1, ok=1); for(i=1, n, if(bigomega(k - F[i]) != 2, ok=0; break)); ok && return(k)); \\ _Daniel Suteu_, Oct 24 2024 %Y A376332 Cf. A000142, A001358, A181676. %K A376332 nonn,more %O A376332 1,1 %A A376332 _Robert Israel_, Sep 20 2024 %E A376332 a(15)-a(17) from _Daniel Suteu_, Oct 24 2024