Buchstab identity
= Buchstab identity
{c}
{wiki}
If $w<z$, ordering the least prime factor gives
$$
S(\mathcal A,\mathcal P,z)
=S(\mathcal A,\mathcal P,w)
-\sum_{\substack{w\leq p<z\\p\in\mathcal P}}S(\mathcal A_p,\mathcal P,p),
$$
where $(\mathcal A_p)_n=a_{pn}$ in a set formulation, or equivalently $\mathcal A_p$ restricts the original sequence to terms divisible by $p$.