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.

A386978 Numbers k such that the k-th prime gap contains an integer whose least prime factor is greater than or equal to the length of the prime gap.

Original entry on oeis.org

2, 3, 5, 7, 10, 13, 15, 17, 20, 21, 26, 28, 32, 33, 34, 35, 37, 39, 41, 42, 43, 45, 47, 49, 52, 53, 54, 55, 57, 60, 61, 64, 66, 68, 69, 72, 73, 74, 77, 79, 81, 83, 84, 87, 89, 92, 94, 98, 99, 101, 102, 104, 106, 107, 109, 111, 113, 114, 116, 118, 120, 121, 123
Offset: 1

Views

Author

José Hernández, Aug 11 2025

Keywords

Comments

If p and q are twin primes and p

Examples

			1 does not belong to this sequence because the first prime gap is (2,3). The second prime gap is (3,5); since the length of this interval is 5-3=2 and 4 belongs to it, we have that 2 is the first term of the sequence.
		

Crossrefs

Cf. A001223.

Programs

  • Maple
    q:= k-> ((p, r)-> ormap(f-> min(ifactors(f)[2][..., 1])>=
              r-p, [$p+1..r-1]))((map(ithprime, [k, k+1])[])):
    select(q, [$1..123])[];  # Alois P. Heinz, Aug 12 2025
  • Mathematica
    For[n = 1, n <= 200, n++, k = Prime[n];
    count = 0;
    While[k < Prime[n+1], If[FactorInteger[k][[1,1]] < Prime[n+1] - Prime[n], count = count+1]; k++;];
    If[count == Prime[n+1] - Prime[n] - 1, , Print[n]]]
    (* This code outputs all the terms of the sequence in the interval [1, 200]. *)