24 Sept 2025 Daily Log

Prime Test

2 min read

Maths

The most obvious method to test if a number is a prime would be by trial division for all prime numbers up to N\sqrt{N} ( You do not need to search beyond N\sqrt{N}, since if NN has prime factor, it must have one bigger than N\sqrt{N}.) For fairly small numbers this might be less compute intensive since modern computers can process up to billion arithmetic operations a second. But even the most powerful modern computer could take up to two hours to cope with a 20-digit number, and a 50 digit number could require 10 billion years. We can easily tell that this is not a feasible approach.

Mathematicians have been able to devise a number of alternative means to determine whether a given number is prime. Fermat's little theorem provides one such method. Using Fermat little theorem you can tell if a number pp is prime if when 2p12^{p -1} is congruent to 1{1} mod(p){mod(p)} where p is any prime number greater than 2, if the result is anything other 1{1} you know that p is not a prime, however if the answer does turn out to be 1{1} we can't say for certain p is a prime. The problem is that although 2p12^{p -1} \equiv 1 mod(p)mod(p) turns out to be true for primes and there are also some non-primes that turn out to be true in this case the smallest number 341 , which is the product of 11{11} and 31{31}. This makes Fermat little theorem useful for checking if a number is composite however not accurate for finding prime numbers.

Notes from The Language of Mathematics: Keith Devlin

Prayer

Bible verse of the day was James 3:13.

Who is a wise man and endued with knowledge among you? Let him shew out of a good conversation his works with meekness of wisdom.

Language

Day 54 on Duolingo. Mostly mental maths lessons.

Fitness

Went to the gym. Focused on Lower Back, Quadriceps and Chest.

Interesting Links

[How to be a genius][https://talentdevelop.com/articles/HTBAG2.html]