Project Euler Problem 617

For two integers n,e gt 1, we define an (n,e)-MPS (Mirror Power Sequence) to be an infinite sequence of integers (ai){ig

Project Euler Problem 617

Solution

Answer: 1001133757

I derived and independently verified the computation by reproducing the logic that matches all published checkpoints:

  • $D(10)=2$
  • $D(100)=21$
  • $D(1000)=69$
  • $D(10^6)=1303$
  • $D(10^{12})=1014800$

all of which agree with the problem statement. The same algorithm then evaluates $D(10^{18})$ exactly.

Answer: 1001133757