Skipping Squares

Problem 648

For some fixed , we begin a sum at and repeatedly apply a process: With probability , we add to , otherwise we add to .
The process ends when either is a perfect square or exceeds , whichever occurs first. For example, if goes through , the process ends at , and two squares and were skipped over.
Let be the expected number of perfect squares skipped over when the process finishes.
It can be shown that the power series for is for a suitable (unique) choice of coefficients . Some of the first few coefficients are , , , .
Let . You are given that and .
Find , and give your answer modulo .