Transformers in Pseudo-Random Number Generation: A Dual Perspective on Theory and Practice