>>14101281look, I'm an engineer, I know a little math, a little coding, don't go theoretical on me
first program compared all dicerolls in two for loops, 1-1000 for the first and 1-1000 for the second roll, and checked if their sum was one of the predefined primes under 2000
second program actually does a modulus calculation to see if there is ever no leftover, if there is none at least once, it's not a prime
it does so by testing it for all numbers between 2 and its own square root, so if the number was 100 it wouldn't bother to check above 11
and since two die have a nice triangle distribution
for 2d6:
1 way to make 2
...
5 ways to make 6
6 ways to make 7
then going down
5 ways to make 6
4 ways to make 5
...
1 way to make 12
and it only counts that number if it was a prime