Split the square at different points and see if sum of any pair of splitted numbers is equal to n .
for ( $ r_digits = 1 ; $ r_digits < $ count_digits ; $ r_digits ++ ) { $ eq_parts = pow ( 10 , $ r_digits ) ;