The most beautiful experience we can have is the mysterious.

Sum Of Digits

Sum all the digits of number N (>0), if result has more than one digit, repeat summing all the digits of the result of each round, until reaching a single digit number R. For example: $$N = 365 => 3 + 6 + 5 = 14 => R = 1 + 4 = 5 $$ Algorithm: $$R = (N – 1) mod 9 + 1$$ Proof Represent each digit in N as a_{k}

Unbeatable Noughts & Crosses

Deep Blue Algorithm (Minimax)

The AI algorithm Minimax is used to decide the next best move in two player games like chess and go zero-sum games. It goes through all the possible moves between two players, and scores each simulated game result according to the end status: If the AI player wins, it is given a positive score If the opponent player wins, it is given a negative score If it is a draw, it is given score 0 The scores will be rolled up to their upper level nodes:

Is 2021 A Prime Number?

A prime number is a positive integer that can only be exactly divided by itself and 1. Algorithm: to judge whether X is a prime number or not, we can assume a number n has n x n = X (n = sqrt(X)). If X is not prime, it will have at least one integer pair n1 and n2, such that n1 x n2 = X, n1∈[2,n], n2∈[n,X]. We can then narrow down the scope that if X is exactly divisible by a number between 2 and sqrt(X), it is not a prime; otherwise, it is a prime.