This my post may be inappropriate since math may be irrelevant in this topic.
I've read this article of wikipedia of the hacker called Mathew Bevan.
Seemingly the ariticle has not specified how Bevan acquired the skills of hacking which led him to penetrate into the system of the air-force-base.
I always wonder how nominant hackers has acquired the hacking-skills.
For instance in math, we can acquire the skills of calculus-stuff doing exercises of problems in textbooks. But how with penetrating into a military-system?
By the way I know that some pentest-os let us to learn some ethical-hacking-skills.