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.

This page as a plain text file.
%I A386978 #32 Aug 14 2025 20:18:14
%S A386978 2,3,5,7,10,13,15,17,20,21,26,28,32,33,34,35,37,39,41,42,43,45,47,49,
%T A386978 52,53,54,55,57,60,61,64,66,68,69,72,73,74,77,79,81,83,84,87,89,92,94,
%U A386978 98,99,101,102,104,106,107,109,111,113,114,116,118,120,121,123
%N 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.
%C A386978 If p and q are twin primes and p<q, then the interval (p, q) contains an integer whose least prime factor is greater than or equal to the length of the prime gap (p, q): indeed, the least prime factor of p+1 is greater than or equal to 2 whereas the length of the gap is q-p=2.
%H A386978 Ayla Gafni and Terence Tao, <a href="https://arxiv.org/abs/2508.06463">Rough numbers between consecutive primes</a>, arXiv:2508.06463 [math.NT] (2025).
%e A386978 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.
%p A386978 q:= k-> ((p, r)-> ormap(f-> min(ifactors(f)[2][..., 1])>=
%p A386978           r-p, [$p+1..r-1]))((map(ithprime, [k, k+1])[])):
%p A386978 select(q, [$1..123])[];  # _Alois P. Heinz_, Aug 12 2025
%t A386978 For[n = 1, n <= 200, n++, k = Prime[n];
%t A386978 count = 0;
%t A386978 While[k < Prime[n+1], If[FactorInteger[k][[1,1]] < Prime[n+1] - Prime[n], count = count+1]; k++;];
%t A386978 If[count == Prime[n+1] - Prime[n] - 1, , Print[n]]]
%t A386978 (* This code outputs all the terms of the sequence in the interval [1, 200]. *)
%Y A386978 Cf. A001223.
%K A386978 nonn,easy
%O A386978 1,1
%A A386978 _José Hernández_, Aug 11 2025