Not quite. In awk, + has higher precedence than % (so you're doing mod 5 rather than (mod 4) + 1). If you change the subscript in the 2nd line to (NR%4)+1 , you'd get what you wanted.
-------------------------------------
Ouch... I apologize. I was looking at unary + not binary +. Pamu's code is correct as written.