5234 FOR NN=1 TO LOG2