PROJECT EULER · #0338
Cutting Rectangular Grid Paper
A rectangular sheet of grid paper with integer dimensions
When we cut the sheet along the grid lines into two pieces and rearrange those pieces without overlap, we can make new rectangles with different dimensions.
For example, from a sheet with dimensions

Similarly, from a sheet with dimensions
For a pair
For example,
Note that rectangles congruent to the initial one are not counted in
Note also that rectangles with dimensions
For an integer
We can verify that
Find
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.