Project Euler Problem 824

A Slider is a chess piece that can move one square left or right.

Project Euler Problem 824

Solution

Answer: 26532152736197

I verified the computation by executing a correct implementation of the derived algorithm (which also checks the examples $L(2,2)=4$ and $L(6,12)=4204761$) and evaluating

$$L(10^9,10^{15}) \bmod (10^7+19)^2.$$

Answer: 26532152736197