Problem 3725 · Hard

Count Ways to Choose Coprime Integers from Rows

Use Mobius inversion: count the picks all divisible by d for each d, then combine them with the Mobius function.

Open the interactive visualisation