[math-fun] Generalized "square pyramid" question