We address a problem initiated by Davenport in 1937 ([5] et [6]). Let $z\in\mathbb{C}$. We study the conditions on real $\vartheta$, and its continued fraction expansion, for the validity of the formal identity
$$\sum_{m=1}^\infty{\tau_{z+1}(m) \over \pi m}\sin(2 \pi m\vartheta)+\sum_{n=1}^\infty{\tau_z(n) \over \pi n}B(n\vartheta)=0$$ where $B$ denotes the first Bernoulli function and $\tau_z$, the Piltz function of order $z$. We use methods developed by Fouvry, La Bret\`eche and Tenenbaum ([8] et [2]), based on summation over friable integers.