So, let me say for the first one that n=17. Since 17 is congruent to 1 mod 4, that would satisfy part (a)? Since part (a) is satisfied, I would take part (b)'s approach and ignore part (c). The answer to part (b) would be , where a=4 and b=1.
I think I will get confused when n does not belong to , and I will not know how to approach part (c).
Sum of squares
I should have just googled this earlier! Thanks to the last replier, it got me on the right track.