triangle prime problem