But given a pseudorandom number generator with a known amount of internal state (eg a 32 bit seed) there are hard upper limits on the lengths of sequences like that that can plausibly be produced.
Of course, to get 4 out of a PRNG you probably have to ask it for a random number in a range - if you’re requesting numbers in the range 0-1000 then you would expect fewer long sequences of fours than if you request in the range 0-5. And you can get arbitrarily many 4s by requesting numbers in the range 4-4...
You can't prove that a string of 24 fours is not random, and the fact that some process returned 24 fours once is not proof (but is some evidence) that it's not random - however, a process that always returns 4 is not random.
A process that returns a single fixed number (which was chosen by a fair dice roll) once is a random process. Using that same
process twice or more is not.
Tangential but related: Brownian motion (i.e. continuous-time random walk) is recurrent in one and two dimensions -- it hits zero infinite times, but in three dimensions it is not.
The way my professor explained: a drunkard can always find his way back to his building, but not to his apartment.
> The way my professor explained: a drunkard can always find his way back to his building, but not to his apartment.
That might be true for a drunk Kitty Pryde, but is it true for a drunk ordinary human who is constrained to only move between floors via the stairs or elevator?
There's no way to prove, of which I am aware, that a string of 24 fours is not random.