cp's OEIS Frontend

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.

A383969 a(n) is the smallest even number m such that the set {m+1, m+3, m+5, ..., m+(2*n-1)} contains no prime numbers.

This page as a plain text file.
%I A383969 #17 Jun 05 2025 23:45:05
%S A383969 0,24,90,114,114,114,524,524,888,1130,1328,1328,1328,1328,1328,1328,
%T A383969 9552,15684,15684,15684,15684,19610,19610,19610,19610,31398,31398,
%U A383969 31398,31398,31398,31398,31398,31398,31398,31398,155922,155922,155922,155922,155922,155922,155922
%N A383969 a(n) is the smallest even number m such that the set {m+1, m+3, m+5, ..., m+(2*n-1)} contains no prime numbers.
%C A383969 For a(2) onward, consists of terms of A008950(n), perhaps repeated, based on the increase in records. So, higher terms may be easily computed using the b-files at A008950 and A002386. - _Michael S. Branicky_, May 23 2025
%e A383969 a(1) = 0 since 0 is the smallest even number such that 0 + 1 = 1 is not prime
%e A383969 a(2) = 24 since there are no primes in {24+1, 24+3} = {25, 27} and no smaller even number has this property.
%e A383969 a(3) = 90 since there are no primes in {91, 93, 95}, and no smaller even number has this property.
%t A383969 k = 0; Table[While[AnyTrue[k + Range[2*n - 1], PrimeQ], k += 2]; k, {n, 42}] (* _Michael De Vlieger_, Jun 01 2025 *)
%o A383969 (Python)
%o A383969 from sympy import isprime
%o A383969 from itertools import count
%o A383969 def a(n): return next(m for m in count(0, 2) if all(not isprime(m+2*i+1) for i in range(n)))
%o A383969 print([a(n) for n in range(1, 43)]) # _Michael S. Branicky_, May 23 2025
%Y A383969 Cf. A000040, A002808, A018252, A008950, A002386.
%K A383969 nonn
%O A383969 1,2
%A A383969 _David James Sycamore_, May 16 2025
%E A383969 a(4) and beyond from _Michael S. Branicky_, May 23 2025