John replied:
> Who would have guessed!

Thanks! Guessing is fun, especially in groups! But shush now, or other people might think I'm worse than lazy.

Let's work a bit, as a distraction from work. Matrix multiplication works like this:

\$c_{ij} = \sum_k^n a_{ik} \cdot b_{kj} \$

Let's say a is our adjacency matrix, and b the n-1th power of a. Every element \$$a_{ij}\$$ tells us wether there's an arrow \$$i \rightarrow j\$$. You can skip thinking recursively for now and just assume that \$$b=a\$$. Then \$$c_{ij}\$$ is the sum of all those \$$b_{kj}\$$ for which a states that there's an arrow \$$i \rightarrow k\$$. Nonrecursively, these are just the neighbours' arrows!

So these square matrices are just perfect for recording the inflow any element gets!

I still have to check how my initial formula relates to all this. Until then, maybe some of the folks reading here might enjoy this 5 page short distraction as much as I did:

_"On the computation of the nth power of a matrix"_ by **Nikolaos Halidias** (2017):
https://arxiv.org/abs/1705.04994