I think that this is quite tricky unless you know something about recurrence relations. I would start by proving this result:

Let be a bounded sequence of real numbers such that (for all n≥0). Then is periodic with period 42. (In other words, for all n.)

The result about the function f will then follow by taking (and it will show that T=1).

To prove the result about the sequence, you need to go from the recurrence relation to the auxiliary equation Write this as to see that its roots are (double root) together with all the other (complex) sixth and seventh roots of unity. The theory of recurrence relations tells you that the sequence is given by , where and the s are constants, and the sum is taken over all the sixth and seventh roots of unity apart from 1 itself.

The fact that the sequence is bounded tells you that . Since each satisfies it then follows that has period 42, as required.