# Weights in Cellular Automaton

It is not clear for me how are the weights used in the function CellularAutomaton. The code for outer totalistic 1D CA is:

$$\bf{OT}= \sum_{i=0}^{2r(k-1)} \sum_{j=0}^{k-1} k^{k i+j} \phi_{out-tot}(j,i)$$

and for 2D CA the code is:

$$\bf{OT}=\sum_{0 \le n \le N_{ij}-1} \sum_{0 \le \alpha \le k} \phi_{out-tot}(\alpha,n) k^{\alpha+k n}$$

with different rules for totalistic CAs. How are the weights used in the code? I've seen a post here in which an explanation is given for simple cases, but how are the weights used in general, for arbitrary r range and k colors?, How do the weights affect the rule in general?

Is there any academic reference?, I didn't find it in the Wolfram documentation nor in his papers, at least with a fast reading.

The formulas above are given in the book of Andrew Ilachinski, "Cellular Automata: A discrete Universe".