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.

Original entry on oeis.org

0, 24, 90, 114, 114, 114, 524, 524, 888, 1130, 1328, 1328, 1328, 1328, 1328, 1328, 9552, 15684, 15684, 15684, 15684, 19610, 19610, 19610, 19610, 31398, 31398, 31398, 31398, 31398, 31398, 31398, 31398, 31398, 31398, 155922, 155922, 155922, 155922, 155922, 155922, 155922
Offset: 1

Views

Author

David James Sycamore, May 16 2025

Keywords

Comments

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

Examples

			a(1) = 0 since 0 is the smallest even number such that 0 + 1 = 1 is not prime
a(2) = 24 since there are no primes in {24+1, 24+3} = {25, 27} and no smaller even number has this property.
a(3) = 90 since there are no primes in {91, 93, 95}, and no smaller even number has this property.
		

Crossrefs

Programs

  • Mathematica
    k = 0; Table[While[AnyTrue[k + Range[2*n - 1], PrimeQ], k += 2]; k, {n, 42}] (* Michael De Vlieger, Jun 01 2025 *)
  • Python
    from sympy import isprime
    from itertools import count
    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)))
    print([a(n) for n in range(1, 43)]) # Michael S. Branicky, May 23 2025

Extensions

a(4) and beyond from Michael S. Branicky, May 23 2025