Logic for the lower part of pattern

I am not able to build the logic for the lower part of this pattern problem. Please help me