login
A390840
a(n) is the number of primes q <= A080082(n) such that prime(n) divides q + 1.
2
3, 5, 7, 4, 17, 30, 11, 185, 372, 161, 120, 939, 585, 336, 1876, 1663, 1758, 3766, 7168, 9805, 5768, 37905, 59538, 27169, 97275, 61846, 125253, 130897, 163382, 243903, 480543, 628969, 472958, 1462515, 2676940, 2062245, 2624108, 1681356, 8038588, 2969555, 4194212
OFFSET
1,1
COMMENTS
A080082(n) gives the start of the first prime gap (cf. A001223) of size 2*prime(n).
This sequence is related to the question whether the product of (prime(k)+1)/A001223(k) (cf. A390839) is always an integer. It shows that for increasingly large primes p, there occur more and more factors of p in the numerator before the first gap has a factor p.
LINKS
M. F. Hasler, in reply to Sebastian M. Ruiz, All integers?, PrimenumbersTheory group.io, Nov 21 2025.
MATHEMATICA
a080082[n_]:=Module[{p=2}, Until[NextPrime[p]-p==2Prime[n], p=NextPrime[p]]; p]; a[n_]:=Module[{c=0}, qp=PrimePi[a080082[n]]; Do[If[Mod[Prime[q]+1, Prime[n]]==0, c++], {q, 1, qp}]; c]; Array[a, 20] (* James C. McMahon, Nov 26 2025 *)
PROG
(PARI) {A390840(n, p=prime(n), c=0) = forprime(q=2, A080082(n), (q+1)%p || c+=1); c}
CROSSREFS
Cf. A080082 (where gap 2*prime(n) occurs first), A001223 (prime gaps).
Cf. A390841-A390844 (2-, 3-, 5- and 7-valuation of the product A390839).
Sequence in context: A356026 A356379 A324712 * A279321 A254863 A085965
KEYWORD
nonn
AUTHOR
M. F. Hasler, Nov 21 2025
EXTENSIONS
a(31)-a(33) from Sean A. Irvine, Nov 26 2025
a(34)-a(41) from Jinyuan Wang, Nov 29 2025
STATUS
approved