Algorithms know.  Pascal Triangle coded, but Pyramid not coded.