The second problem is the interpretation of statistical significance. You don't even explain how you compute it, and it's not in the code. For starters, what's your df?
Another problem is the sample. It might be possible that any range of 10,000 digits isn't random (according to your criterion), but the whole is. Now that I think about it: it is very likely there is a structure, since it's a rather limited string, and the number of possible bit strings of length n quickly outnumbers the total length of the string for increasing n. 10k bits can only contain the unique strings up to length 10, and those wouldn't be random at all (since you can predict the remaining bits with increasing accuracy). So the details of your prediction model are really essential.