Source: https://www.um.edu.mt/library/oar/bitstream/123456789/24439/1/powers of the adjacency matrix.pdf