← Complete problem index

PROJECT EULER · #0774

Conjunctive Sequences

Statement only · UnsolvedOriginal problem ↗

Let '&' denote the bitwise AND operation.
For example, 10&12=10102&11002=10002=8.

We shall call a finite sequence of non-negative integers (a1,a2,,an) conjunctive if ai&ai+10 for all i=1n1.

Define c(n,b) to be the number of conjunctive sequences of length n in which all terms are b.

You are given that c(3,4)=18, c(10,6)=2496120, and c(100,200)268159379(mod998244353).

Find c(123,123456789). Give your answer modulo 998244353.

Write-up coming later

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