Instead of considering $100$ cards, we assume there are $n$ cards, where $n \geq 1$. Let $X_n$ denotes the # of cycles given $n$ cards and we are interested in the following identity $\mathbb{E}[X_n]$. We also introduce another random variable, denoted as $L$, which denotes the length of the first cycle, thus $L \in [1, n]$. We use the following fact of conditional expectation:
$$
\mathbb{E}[X_n] = \sum_{i=1}^n \mathbb{E}[X_n\mid L = i]\cdot\Pr[L = i] \tag{1}
$$
We first show how to compute $\Pr[L = i]$. This is in fact not a difficult task.
- If $i = 1$, then the first position must be the card with value $1$, the probability is $\frac{1}{n}$.
- If $i = 2$, the first position is a card whose value is not $1$. This probability is $\frac{n-1}{n}$. And the position specified by the first card should contain the card with value $1$ such that the cycle is of length $2$. This probability is $\frac{1}{n-1}$. So the probability of $L = 2$ is just $\frac{n-1}{n} \cdot \frac{1}{n-1} = \frac{1}{n}$.
- We can generalize the results above to more general $i$. Specifically,
$$
\Pr[L = i] = \frac{n-1}{n} \cdot \frac{n-2}{n-1} \cdot \cdots \frac{1}{n-i+1} = \frac{1}{n} \tag{2}
$$
We next show how to compute $\mathbb{E}[X_n \mid L = i]$. If the first cycle is of length $i$, the expectation of $X_n$ is just the expectation of # of cycles in the remaining $n - i$ cards plus $1$, i.e.,
$$
\mathbb{E}[X_n \mid L = i] = \mathbb{E}[X_{n-i}] + 1 \tag{3}
$$
To sum up, we have
$$
\mathbb{E}[X_n] = \sum_{i=1}^n (\mathbb{E}[X_{n-i}] + 1)\cdot\frac{1}{n} = 1 + \frac{1}{n}\sum_{i=1}^n\mathbb{E}[X_{n-i}]\tag{4}
$$
Specially, we have
$$
\mathbb{E}[X_0] = 0 \text{ and } \mathbb{E}[X_1] = 1
$$
From $(4)$, we can obtain
$$
n\mathbb{E}[X_n] = n + \sum_{i=1}^n\mathbb{E}[X_{n-i}] \tag{5}
$$
and
$$
(n-1)\mathbb{E}[X_{n-1}] = n - 1 + \sum_{i=1}^{n-1}\mathbb{E}[X_{n-1-i}] \tag{6}
$$
Substracting $(6)$ from $(5)$ results in:
$$
n \mathbb{E}[X_n] - (n-1)\mathbb{E}[X_{n-1}] = 1 + \mathbb{E}[X_{n-1}] \Rightarrow \mathbb{E}[X_n] = \mathbb{E}[X_{n-1}] + \frac{1}{n}
$$
Consequenlty, we conclude that
$$
\mathbb{E}[X_n] = \sum_{i=1}^n \frac{1}{i} = H_n
$$