First off, it's trivially impossible since you can't pair 17 students (much less group them in 4). Assuming that you somehow deal with that problem (say, by letting one of them play games while the others work) and get to a multiple of $4$, you can show that this is possible if you have at least $8$ students as follows: Divide the students into groups of $4$, and arrange the groups in a cycle. Choose $2$ students from each group to pair with the preceding group in the cycle, and $2$ to pair with the following group in the cycle. In the first two weeks, form the $2$ possible pairs of students from the pairs of adjacent groups in the cycle with the students who have been designated to be thus paired. Then in the third week put them in the groups you formed.
[Edit in response to the edit to the question:] If you have $4n+1$ students and allow teams of $3$ and $5$, respectively, then it's no longer possible for $n=2$ (i.e. $9$ students), but possible for $n>2$ (i.e. $13, 17, \ldots$ students).
To see that it's impossible for $9$ students, note that the $5$ students in the team of $5$ would have to have had $5$ different partners in the first week, but there are only $4$ other students.
To see that it's possible for $13, 17, \ldots$ students, use the same grouping as in the $4n$ case, but designate one student as the "extra" student and put her in some team of $5$. Then in the first week, add her to arbitrary pairings between two adjacent teams of $4$ (which exist since there are at least $8$ students other than the $5$).