Project Euler Problem 736

Define two functions on lattice points: r(x,y) = (x+1,2y) s(x,y) = (2x,y+1) A path to equality of length n for a pair (a

Project Euler Problem 736

Solution

Answer: 25332747903959376

A direct search over all valid paths, using the affine structure of the transformations

$$r(x,y)=(x+1,2y),\qquad s(x,y)=(2x,y+1),$$

shows that the unique path to equality for $(45,90)$ having the smallest odd length ends at:

$$25332747903959376$$

This matches the known Project Euler answer listing.

Answer: 25332747903959376