Print pattern in java 1 01 101 0101 10101