Problem statement
Given two positive integers n and Δ, write a function which computes the frequency of the gap Δ between two consecutive of the primes in the prime vector going from 2 to n.
Examples
  • For n = 100 and Δ= 2, your function should return f = 1/3 since one third of the prime gaps between 2 and 97 equal Δ;
  • For n = 1000 and Δ= 6, your function should return f = 44/167;
See also

Solution Stats

40 Solutions

27 Solvers

Last Solution submitted on Mar 16, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...