I have Cliff Pickover to thank for this information about the number 97. Figure 1 shows his tweet on October 4th 2022:
Figure 1 |
So to reproduce the fine print: 97 is the largest prime that we can find that is less than the sum of squares of its digits. The sum of the squares of the digits is 130 in this case. This fact prompted me to explore what the largest primes are when we consider the cube, fourth powers and so on of the digits. Here is a permalink to an algorithm I developed for investigating this matter; it's set up for digits raised to the sixth power and can be easily modified to test other powers. Here's what I found.
- 97 is the largest prime for digits raised to the power 2
- 1,999 is the largest prime for digits raised to the power 3
- 19,997 is the largest prime for digits raised to the power 4
- 199,999 is the largest prime for digits raised to the power 5
- 2,999,999 is the largest prime for digits raised to the power 6
Beyond powers of 8, SageMathCell will time out. Let's get back to the case of 97 being the largest prime that is less than the sum of squares of its digits. If we remove the condition that the number is prime, it turns out that 99 is the largest number that is less than the sum of squares of its digits. This is because every three digit number is greater than the sum of squares of its digits. Put mathematically, we can say that:$$100a+10b+c>a^2+b^2+c^2$$where \(a\) can be any digit between 1 and 9 while \(b\) and \(c\) can be any digits between 0 and 9. This relationship can be rewritten as:$$(100a-a^2)+(10b-b^2)+(c-c^2)>0$$To see why this is true, let's look at the minimum possible value of \(100a-a^2\). This occurs when \(a=1\) and produces a value of 99. Similarly the minimum possible value of \(10b-b^2\) occurs when \(b=0\) and produces a value of zero. \(c-c^2\) has a minimum value when \(b=9\) producing a value of -72. Thus the minimum possible value is +27 and greater than zero.
This inequality does not hold true of course if the digits are raised to the third power. Thus:$$100a+10b+c \text{ can be less than } a^3+b^3+c^3\\ \text{or } (100a-a^3)+(10b-b^3)+(c-c^3)\text{ can be less than }0$$The largest three digit number, 999, is certainly less than the sum of cubes of its digits (2187). We must look at four digit numbers then and find the maximum possible values for \(a,b,c\) and \(d\) such that:$$1000a+100b+10c+d<a^3+b^3+c^3+d^3\\ \ \text{or } (1000a-a^3)+(100b-b^3)+(10c-c^3)+(d-d^3)<0$$It's easy to determine that 1,999 is the largest number that is less than the sum of the cubes of its digits. The number just happens to be prime. Similarly it can be shown that 19,999 is the largest number that is less than the sum of its digits raised to the fourth power. The largest prime is then the nearest prime less than this number and that happens to be 19,997. And so on.
No comments:
Post a Comment