Prove that there are infinitely many composite number $m$ such that $a^{m-1} - 1$ is divisible by $m$

There can be infinitely many solutions for congruence $a^{m-1}≡1 \mod m$ if $a= km+1$,(this shows that a and m are co-primes) because with this condition we may write:

$a≡1 \mod m$$a^{m-1}≡1^{m-1}\mod m≡1\mod m$

Now for a given m There is always a number like $a=km+1$ and in contrary for a given a there is a number like m such that $km+1=a$. If m is composite then each factor of it satisfies the relation; in fact we have:

If $a^{m-1}≡1 \mod m$, and $m= \alpha\times \beta\times \theta...$ then following congruence hold:

$a^{\alpha-1}≡1 \mod m$

$a^{\beta-1}≡1 \mod m$

$a^{\theta-1}≡1 \mod m$

The general argument is to claim that the necessary and sufficient condition for congruence be hold is that $a-1$ and m must have a common divisor, in fact we have:

$(a-1)^m≡1\mod a≡1\mod m$

Examples:

$61^{20-1}≡1\mod 20$

$106^{21-1}≡1\mod 21$

$27^{52-1}≡1\mod 52$

In this example $a<m$ and congruence holds because $a-1$ and m have the common divisor 26.