Lets start by defining the function in question;
$y(t)= \frac{\pi{sin(kt)}-ksin{(\pi{t}})}{\pi^{2}k-k^{3}}$
Now the question.
So from what i gather the function is periodic when $k=n\pi\;$ , $\;\forall n \in \mathbb{R}$, except when $n=1$ which causes resonance.
Why is this the case? For example why is it not periodic when $k=1$?
If $y(t)$ is periodic with period $T$, that means
$$ \pi \sin(k(t+T)) - k \sin(\pi (t+T)) = \pi \sin(kt) - k \sin(\pi t)$$ i.e. $$ \pi (\sin(k(t+T)-\sin(kt)) = k (\sin(\pi (t+T)) - \sin(\pi t)) $$
or $$ \pi ((\cos(kT)-1) \sin(kt) + \sin(kT) \cos(kt) = k ((\cos(\pi T)-1) \sin(\pi t) + \sin(\pi T) \cos(\pi t) $$
If $k \ne \pm \pi$ and $k \ne 0$, $\cos(k t), \sin(k t), \cos(\pi t)$ and $\sin(\pi t)$ are linearly independent, so for this to be an identity you need $\cos(kT) = 1$ and $\cos(\pi T) = 1$. That will require $k$ and $\pi$ to be rationally related. Namely if $\cos(\pi T) = 1$, $T = m$ for some even integer $m$, and if $\cos(k T) = 1$ $kT = n \pi$ for some even integer $n$. Thus $k = n \pi/m$.