I’m writing a short blog to see if math formulas could be shown correctly.
Intro
Today is 12/29 (Dec 29th). It would be cool if I can come up with some math questions whose answers are 1229.
A more general problem would be: given an integer \(x\), how can we find an interesting math question whose answer is exactly \(x\).
What questions are interesting?
It is very easy to construct a simple question whose answer is 1229. For example: \[\text{What is the value of } 723 + 506 \text{?}\]
However, this question is not interesting enough, It is easy, since it can be solved by simple calculation. It is also not elegant, because there are two strange numbers “726” and “506” which seems coming from nowhere.
However, could we find some questions which are more interesting?
How about this: \[\text{How many prime numbers are less than } 10000 \text{?}\]
This question is interesting. It cannot be solved instantly, and it doesn’t contain any strange numbers or formulas in the question.
You might find it surprising that the answer of this question is indeed 1229. You can check this by this one-line python code.
1
2
>>> len([num for num in range(2, 10000) if all(num % i for i in range(2, num))])
1229
How could we find those interesting questions?
How did I find such a question whose answer is exactly 1229? This is the key part of this blog. The trick is to use a website called The On-Line Encyclopedia of Integer Sequences, or simply OEIS
This website stores many integer sequences. It also allows you to search for interesting sequences which contains a given number.
Here we use OEIS to search for sequences that contains “1229”.
Among the results, we notice that this A006880 might bring us an interesting question whose answer is 1229. According to the website, A006880 is “Number of primes < 10^n.” That is, there are exactly 1229 prime numbers which are less than \(10^4\). Therefore, we can easily construct the question:
\[\text{How many prime numbers are less than } 10000 \text{?}\]
And the answer of this question is 1229.
Using this method, we can also constuct questions like:
\[\text{What is the number of disconnected graphs with 8 nodes? }\]
\[\text{What is the number of strict integer partitions of 59 with no adjacent parts having quotient} \geq 2 \text{?}\]