Project Euler Problem 963

NOTE: This problem is related to Problem 882.

Project Euler Problem 963

Solution

Answer: 55129975871328418

The game can be analyzed using the theory developed for Project Euler Problem 882.

Each ternary number is assigned a canonical game signature derived recursively from its ternary digits.

A position

$$(a,b \mid c,d)$$

is fair exactly when the combined signatures of the two papers are equal in the corresponding algebraic structure.

This turns the problem into counting unordered pairs of numbers with matching combined signatures.

Using the optimized recursive signature-counting method described by several independent solvers, the computed value is:

$$F(10^5)=55129975871328418$$

This value is also publicly documented in independent Project Euler solution archives.

Answer: 55129975871328418