Burton's "Elementary Number Theory", Chapter 5 says
It might be worthwhile to give an example illustrating the failure of the converse of Fermat's Little Theorem to hold, in other words, to show that if $a^{n-1}\equiv 1 \pmod n$ for some integer $a$, then $n$ need not be prime.
and proceeds to show that $2^{340}\equiv 1\pmod {341}$ after which it comments
so that the converse to Fermat's Little Theorem is false.
Now, here's my confusion: if we let $$\text{A: }p \text{ is a prime}\\ \text{B: }a^p\equiv a\pmod p \;\;\forall a\in \mathbb N$$ then (generalized) Fermat's Little Theorem translates to $$\text{A}\implies \text{B}$$ The converse of this should be $$\text{B}\implies \text{A}$$ and its negation should be $$\neg (\text{B}\implies \text{A})$$ or $$\text{B}\wedge \neg\text{A}$$ which translates to
$a^p\equiv a\pmod p \;\;\forall a\in \mathbb N$, but $p$ is not a prime.
So, to illustrate that the converse is false, we really need to find a composite $n$ such that $a^n\equiv a\pmod n$ for all $a$ and not just one $a$ (as done in the book).
I understand that Burton soon introduces absolute pseudoprimes (or Carmichael numbers) which can be valid counterexamples to Fermat's Little Theorem, but I don't understand how the given "counterexample" does the job. It would be of help if someone has an explanation.