in reply to guessing next number on roulette wheel
https://www.dailymail.co.uk/femail/article-6060625/The-cunning-trick-helped-Yorkshire-worker-win-7-5million-1800s-Monte-Carlo.html might give you some ideas for algorithms.
Regards,
John Davies