Please solve the programming task below using a self-contained code snippet in a markdown code block.

Return the number of permutations of 1 to n so that prime numbers are at prime indices (1-indexed.)
(Recall that an integer is prime if and only if it is greater than 1, and cannot be written as a product of two positive integers both smaller than it.)
Since the answer may be large, return the answer modulo 10^9 + 7.
 
Please complete the following python code precisely:
```python
class Solution:
    def numPrimeArrangements(self, n: int) -> int:
```