In January of 2025, I created a post titled Building Block Numbers about a very small set of positive integers that can be used to construct all other positive integers. These numbers form OEIS A086424:
A086424 Numbers needed to generate all other natural numbers, only allowing multiplication and addition. Each number can be used only once.
The initial numbers are:
1, 2, 4, 11, 25, 64, 171, 569, 3406, 27697, 243374, 1759619, 28381401, 222323189, 3416307938, 26838745347, ...
Take my diurnal age today: 28020. Using these building blocks we can represent the number as (permalink):$$28020=(4 \times (171 + (2 \times (11 + 3406))))$$Let's compare this to its represention using products of primes:$$28020=2 \times 2 \times 3 \times 5 \times 467$$At first the difference in economy isn't apparent. Both methods require five numbers. With the first method we cannot repeat any of the numbers but with the second we can. The economy becomes apparent however, when we consider that up to but not including 243374, we only need ten building blocks (1, 2, 4, 11, 25, 64, 171, 569, 3406 and 27697) for every number in the range from 1 to 243373. It is only when we reach 243374 that an additional building block is required. By contrast there are 21494 primes in the same range and each of them is unique and can't be built out of smaller primes.
I got Gemini's NotebookLM to create an infographic and a video about these building blocks:
![]() |
Infographic created by NotebookLM based on this blog post |
![]() |
Table 1: permalink |
I've incorporated this way of building a number into the SageMath algorithm that I use to analyse the number associated with my diurnal age. However, as I thought about the code that Gemini had generated I remembered that there would often be more ways than one to represent a number and I realised that Gemini was serving up the first combination of building blocks that it came across. I then got Gemini to modify its code to display all possible solutions. For 28020, this turned out to be a staggering 796 solution. Many of these however, involved multiplication by 1. I asked Gemini to exclude these and the number fell to 166. Many of these involved the unnecessary use of brackets. After removing these, the final number came down to 16.
Found 16 unique, simplified solution(s):
\(28020 = 4 \times (171 + 2 \times (11 + 3406)) \)
\(28020 = 171 + 27697 + 64 + 11 \times 2 \times 4 \)
\(28020 = 171 + 27697 + 4 \times (11 + 2 + 25) \)
\(28020 = 171 + 27697 + 2 \times (1 + 11 + 64) \)
\(28020 = 1 + 171 + 2 \times 4 \times (11 + 3406 + 64) \)
\(28020 = 1 + 2 + 11 \times (171 + 4 \times (25 + 569)) \)
\(28020 = 171 + 25 + 4 \times (2 \times 64 + 569 \times (1 + 11)) \)
\(28020 = 3406 + 569 + (1 + 2 + 25 \times 64) \times (11 + 4) \)
\(28020 = 1 + 569 + 64 + 2 \times (25 + 4 \times (11 + 3406)) \)
\(28020 = 3406 \times 4 + (1 + 171 + 64) \times (11 + 2 \times 25) \)
\(28020 = 11 + 25 + 171 \times 64 + (1 + 4) \times (2 + 3406) \)
\(28020 = 4 \times (1 + 11 \times (25 + 569) + 2 \times (171 + 64)) \)
\(28020 = 2 \times (3406 + 4 \times (1 + 569 + 11 \times 171)) + 25 \times 64 \)
\(28020 = 3406 + 64 + 2 * (25 + (1 + 4) \times (569 + 11 * 171)) \)
\(28020 = (1 + 4) \times (171 + 3406 + 569 + 2 \times (25 + 11 \times 64)) \)
Looking at these solutions it can be seen that they are ordered by number of terms used, fewer to more numerous. The first two solutions require only five building blocks and thus of course are to be preferred.


No comments:
Post a Comment