The Smith normal form of Hadamard matrices from Paley's second construction (The Electronic journal of linear algebra, 2025)