Beautiful permutations
Your task
A permutation perm of 1..n is 'beautiful' if for every 1-indexed position i, either perm[i] is divisible by i or i is divisible by perm[i]. Return the number of beautiful permutations of 1..n. 1 <= n <= 12.
Examples
beautiful_arrangement(n: int) -> intExample 1
Input
beautiful_arrangement(2)Output
2