Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
In base $2$ the solutions are A306259:
Composite numbers k such that $2^{(k(k-1))} \equiv 1 \pmod k^2$
From a comment: It contains all Fermat pseudoprimes to base 2, A001567.
The sequence starts:
21, 105, 165, 205, 231, 273, 301, 341, 385, 465