Number of Self-Divisible Permutations
Given an integer n, count permutations of [1,2,...,n] that are self-divisible: for each position i (1-indexed), the number at position i is divisible by i.
Given an integer n, count permutations of [1,2,...,n] that are self-divisible: for each position i (1-indexed), the number at position i is divisible by i.