Diophantine equation for the tan2 well