Hint $\,\ 3^2\mid 45\mid 3^{45}\!-\!3\,\Rightarrow\, 3^2\mid 3,\,$ contradiction.
Remark $\ $ The above show that the modulus $\,n\,$ must be $\,\rm\color{#0a0}{squarefree}.\,$ It's an easy part of
Theorem $ $ (Korselt's Carmichael Criterion) $\ $ For $\rm\:1 < e,n\in \Bbb N\:$ we have
$$\rm \forall\, b\in\Bbb Z\!:\ n\mid b^e\!-b\ \iff\ n\ \ is\ \ \color{#0a0}{squarefree},\ \ and \ \ \color{#c00}{p\!-\!1\mid e\!-\!1}\ \, for\ all \ primes\ \ p\mid n\quad $$
Proof $\ $ See this answer.this answer.