Phalen Algorithms and Functions