\(25\) primes between \(1\) and \(100\), and to have exactly \(22\) “foolish” primes, we must fix exactly \(3\) of them in their natural positions.
\[P=\frac{\binom{25}{3}\cdot \sum_{j=0}^{22}(-1)^j\binom{22}{j}(97-j)!}{100!}\]
\(25\) primes between \(1\) and \(100\), and to have exactly \(22\) “foolish” primes, we must fix exactly \(3\) of them in their natural positions.
\[P=\frac{\binom{25}{3}\cdot \sum_{j=0}^{22}(-1)^j\binom{22}{j}(97-j)!}{100!}\]