How to generate the same random numbers in one language as in another?
R uses its own initialization method for the Mersenne-Twister (see help("set.seed")), which differs from what other languages do. The easiest way to ensure the same PRNG is used (and to avoid implementing something subpar yourself), is simply interfacing R and Stata and using the PRNG from either of these.
However, it's worth keeping in mind that achieving true reproducibility is impossible unless you are using exactly the same software on exactly the same hardware and OS. Thus, I wouldn't spent effort on trying to achieve the same PRNG streams with different software. Instead I would generate these numbers, store them and import them as needed.
I am translating codes from Stata to R. The same random seed does not generate the same outputs. I am not sure if this is also the case in other languages (Python, Java etc.). How to generate identical random numbers in different languages?