Electronic structure and magnetic properties of RNi5-xCux alloys (R=Y, La, Ce)