HCLTech interview question

What is the logic for the Prime Triangle