yaworsw/euler-manager

View on GitHub
data/problems/409.yml

Summary

Maintainability
Test Coverage
---
:id: 409
:name: Nim Extreme
:url: https://projecteuler.net/problem=409
:content: |+
  Let <var>n</var> be a positive integer. Consider **nim** positions where:

  - There are <var>n</var> non-empty piles.
  - Each pile has size less than 2<sup><var>n</var></sup>.
  - No two piles have the same size.

  Let W(<var>n</var>) be the number of winning nim positions satisfying the above conditions (a position is winning if the first player has a winning strategy). For example, W(1) = 1, W(2) = 6, W(3) = 168, W(5) = 19764360 and W(100) mod 1&nbsp;000&nbsp;000&nbsp;007 = 384777056.

  Find W(10&nbsp;000&nbsp;000) mod 1&nbsp;000&nbsp;000&nbsp;007.