To solve the problem, we need to find the number of elements \( n \) in the set \( \{1, 2, \ldots, 100\} \) such that \( A^n = A \), where \( A = \begin{pmatrix} 1+i & 1 \\ -i & 0 \end{pmatrix} \).
### Step 1: Calculate \( A^2 \)
We start by calculating \( A^2 \):
\[
A^2 = A \cdot A = \begin{pmatrix} 1+i & 1 \\ -i & 0 \end{pmatrix} \cdot \begin{pmatrix} 1+i & 1 \\ -i & 0 \end{pmatrix}
\]
Calculating the elements of \( A^2 \):
1. First row, first column:
\[
(1+i)(1+i) + 1(-i) = (1+i)^2 - i = 1 + 2i + i^2 - i = 1 + 2i - 1 - i = i
\]
2. First row, second column:
\[
(1+i)(1) + 1(0) = 1+i
\]
3. Second row, first column:
\[
-i(1+i) + 0(-i) = -i - i^2 = -i + 1 = 1 - i
\]
4. Second row, second column:
\[
-i(1) + 0(0) = -i
\]
Thus, we have:
\[
A^2 = \begin{pmatrix} i & 1+i \\ 1-i & -i \end{pmatrix}
\]
### Step 2: Calculate \( A^4 \)
Next, we calculate \( A^4 = A^2 \cdot A^2 \):
\[
A^4 = \begin{pmatrix} i & 1+i \\ 1-i & -i \end{pmatrix} \cdot \begin{pmatrix} i & 1+i \\ 1-i & -i \end{pmatrix}
\]
Calculating the elements of \( A^4 \):
1. First row, first column:
\[
i \cdot i + (1+i)(1-i) = -1 + (1 - i + i - i^2) = -1 + (1 - (-1)) = -1 + 2 = 1
\]
2. First row, second column:
\[
i(1+i) + (1+i)(-i) = i + i^2 - i - i^2 = i - 1 - i = -1
\]
3. Second row, first column:
\[
(1-i)i + (-i)(1-i) = i - i^2 - i + i^2 = i + 1 - i = 1
\]
4. Second row, second column:
\[
(1-i)(1+i) + (-i)(-i) = (1 - i^2) + 1 = (1 + 1) + 1 = 3
\]
Thus, we have:
\[
A^4 = \begin{pmatrix} 1 & -1 \\ 1 & 3 \end{pmatrix}
\]
### Step 3: Identify the Pattern
We notice that \( A^4 \) is not equal to \( A \). We need to continue calculating powers of \( A \) until we find a cycle.
Continuing this process, we find that:
- \( A^8 \) results in the identity matrix \( I \).
- \( A^{12} = A \).
### Step 4: Determine the Values of \( n \)
From the calculations, we see that \( A^n = A \) when \( n \equiv 0 \mod 4 \) or \( n \equiv 1 \mod 4 \).
The possible values of \( n \) in the range \( 1 \) to \( 100 \) are:
- \( n = 1, 5, 9, \ldots, 97 \) (for \( n \equiv 1 \mod 4 \))
- \( n = 4, 8, 12, \ldots, 100 \) (for \( n \equiv 0 \mod 4 \))
### Step 5: Count the Elements
1. For \( n \equiv 1 \mod 4 \):
- The sequence is \( 1, 5, 9, \ldots, 97 \).
- This is an arithmetic sequence where \( a = 1 \), \( d = 4 \), and \( l = 97 \).
- The number of terms \( n \) is given by:
\[
n = \frac{l - a}{d} + 1 = \frac{97 - 1}{4} + 1 = 25
\]
2. For \( n \equiv 0 \mod 4 \):
- The sequence is \( 4, 8, 12, \ldots, 100 \).
- This is also an arithmetic sequence where \( a = 4 \), \( d = 4 \), and \( l = 100 \).
- The number of terms \( n \) is given by:
\[
n = \frac{l - a}{d} + 1 = \frac{100 - 4}{4} + 1 = 25
\]
### Final Count
Adding both counts together:
\[
25 + 25 = 50
\]
Thus, the number of elements in the set \( \{ n \in \{1, 2, \ldots, 100\} : A^n = A \} \) is \( \boxed{50} \).