We establish results of Bombieri-Vinogradov type for the von Mangoldt function $\Lambda(n)$ twisted by a nilsequence. In particular, we obtain Bombieri-Vinogradov type results for the von Mangoldt function twisted by any polynomial phase $e(P(n))$; the results obtained are as strong as the ones previously known in the case of linear exponential twists. We derive a number of applications of these results. Firstly, we show that the primes $p$ obeying a "nil-Bohr set" condition, such as $\|\alpha p^k\|<\varepsilon$, exhibit bounded gaps. Secondly, we show that the Chen primes are well-distributed in nil-Bohr sets, generalizing a result of Matom\"aki. Thirdly, we generalize the Green-Tao result on linear equations in the primes to primes belonging to an arithmetic progression to large modulus $q\leq x^{ \theta}$, for almost all $q$.
Categories: math.NT