# Gaps between integers with prescribed prime factors

An old question in number theory is the behaviour of gaps between numbers which are sums of two squares. It is know that the gap between consecutive sums of two squares, say $s, s'$, is at most $O(s^{1/4})$. It is expected that for any $\varepsilon > 0$, the gap is at most $O_\varepsilon(s^{\varepsilon})$.

We note that, up to square factors, sums of two squares are numbers which are only divisible by primes congruent to 1 modulo 4 and the prime 2. Therefore a natural extension of this question is the following:

Let $\mathcal{P}$ be a subset of the prime numbers, such that $\mathcal{P}$ has positive natural density in the primes. Let $S'(\mathcal{P})$ be the set of natural numbers $n$ such that $p | n$ if and only if $p \in \mathcal{P}$, and let $S(\mathcal{P})$ be the set of numbers which are square multiples of elements in $S'(\mathcal{P})$. Write

$$\displaystyle S(\mathcal{P}) = \{s_1 < s_2 < s_3 < \cdots \}.$$

What can be said about the gaps $s_{n+1} - s_n$?

Natural examples of $\mathcal{P}$ are primes defined by congruence conditions (say, primes which are $5 \pmod{6}$) or defined by splitting behaviour in a given number field. For example, we can define $\mathcal{P}$ to be the set of primes which split completely over some finite extension $K/\mathbb{Q}$.

• What do you want to know exactly? The same methods should work in this case providing the set of primes under consideration is a "frobenian set" (namely is determined by a conjugacy class in a Galois group, as in the the Chebotarev density theorem). This condition is used to obtain an analytic continuation of the associated Dirichlet series. – Daniel Loughran Feb 19 '18 at 17:53
• Sums of two squares are special, and one does as well as $O(s^{\frac 14})$ because of the greedy algorithm. In general one shouldn't expect to do better than $O(s^{1/2})$ (since you allow multiplying by squares, this is also trivial; but in the context of $S'({\mathcal P})$ this would be a natural limit). If the set of primes $P$ is very close to being the set of all primes then one can say more -- look up work on ${\mathcal B}$-free numbers. – Lucia Feb 19 '18 at 18:38
• @Lucia I was hoping more can be said in the case when the density of $\mathcal{P}$ in the primes is very close to one, which is different in the sums of two squares case where the density is 1/2. Am I correct to understand that there lacks a methodology to approach gap problems with such multiplicative structures? – Stanley Yao Xiao Feb 20 '18 at 20:52