Author: Md. Almas Ali
Date: 29 April, 2024
I found a random statement about math at Facebook and I wanted to validate it. The statement was, "If you divide 1 by 998,001 you get all three-digit numbers from 000 to 999 in order except for 998." I wanted to validate this statement and see if it was true. I wrote a Python script to validate this statement and it was true. I have stored the value in a file for future reference. Also tested if every value is a three-digit number and if the sequence is in order. The script is in the file sequence-validator.py
.
# Clone the repository
git clone https://github.com/Almas-Ali/sequence-validator.git
# Change the directory
cd sequence-validator
# Run the script
python sequence-validator.py
Note: You need to have Python3 installed on your system to run the script.
The output of the script is stored in the file for testing purposes. It is in output-decimals.txt
which is raw decimal values and output-testing.txt
which is processed value for sequence count. Your free to mess with it.
The statement was true. If you divide 1 by 998,001 you get all three-digit numbers from 000 to 999 in order except for 998.
Don't believe everything you read on the internet. Always validate the information before sharing it with others.
Math is fun!