A note on Opial and Wirtinger type discrete inequalities