What aspect of the math do you need help with specifically?
Calculating the probability that that the other player’s dice have at least n dice of a certain number?
Say the other player claims 5 twos. And you have 2 twos, then you’d only need to calculate the probability that the other player has at least 3 twos. (Since 5-2=3)
After that if the probability is too low you can call the other player a liar.
The only other action is making another claim. For that you’d take one of the numbers on your dice, count the number of dice you have with that value and add 1,2,3,4 or 5 to it. It just depends how risky you want to be.
Anyways you want a way to get the probability that the other player has at least n dice with a certain value. N is the number of dice.
The math way to do it is with “probability math”. You can find some nice tutorials online that explain that well. That’s the only math stuff that that article you linked uses for the most part. And really the only strange math operation is the “!” Whitch is called a factorial. For example 4!=4*3*2*1
If you don’t like math then you can also brute force it. Just try all possible dice rolls and count the number of them with at least n dice with a certain value. For 5 dice that’s 6^5 or 7776 possible rolls. No issue to do with a loop.
In a similar vein you could find an approximate probability by only sampling some of the possible rolls. Basically roll all 5 dice 1000 times randomly, and count the number of them with n dice of a certain value.
Another way is to not count or calculate anything. Just have the probabilities pre calculated in an array and reference that.