← Complete problem index

PROJECT EULER · #0703

Circular Logic II

Statement only · UnsolvedOriginal problem ↗

Given an integer n, n3, let B={false,true} and let Bn be the set of sequences of n values from B. The function f from Bn to Bn is defined by f(b1bn)=c1cn where:

  • ci=bi+1 for 1i<n.
  • cn=b1AND(b2XORb3), where AND and XOR are the logical AND and exclusive OR operations.

Let S(n) be the number of functions T from Bn to B such that for all x in Bn, T(x) AND T(f(x))=false. You are given that S(3)=35 and S(4)=2118.

Find S(20). Give your answer modulo 1001001011.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.