There are solutions to the field equations of General Relativity which support a form of time travel, but it is restricted to closed time-like loops.
In this case you would obtain the same random number each time.
The conditions required for these solutions are not physically achievable, as currently understood, and at this point quantum gravity is still in the future. If it ever is achieved, all of the random numbers will come up '42''42'.