I made a post titled Encoding Secret Numbers only recently on the 8th of May 2025 in which I looked at how the Heinz number and Gray Code could be used to encrypt a number. An article I read today suggested another encryption method that is more arcane than the two previously mentioned. The article states that every non-negative integer n can be written as:
You can find, and much as you would find the representation in many other number systems: first find the largest possible , then the largest possible for what’s left, and then the remainder is .
In order to find, we start with the observation that the binomial coefficient C( , 3) is less than /6 and so is less than the cube root of . We can use this as an initial lower bound on then search incrementally. If we wanted to be more efficient, we could do some sort of binary search.
Figure 1 shows the Python code to find
![]() |
Figure 1: permalink |
In the article the term
Unless someone knew about this "binomial number system" it would be impossible to guess what number was being encrypted. Once the binomial "key" is applied however, we find that:
No comments:
Post a Comment