Accenture Interview Question

write down code on pyramid series