Showing posts with label fifth powers. Show all posts
Showing posts with label fifth powers. Show all posts

Wednesday, 5 October 2022

What's Special About 97?

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:$$ \begin{align} 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 \end{align} $$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:$$ \begin{align} 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 \end{align}$$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.

Tuesday, 20 September 2022

Yarborough and Anti-Yarborough Primes

I'd not previously heard of a class of primes known as Yarborough primes. My attention was drawn to this class by the fact that 26833, my diurnal age today, is a member of OEIS A296187:


 A296187

Yarborough primes that remain Yarborough primes when each of their digits are replaced by their squares.


A Yarborough prime is simply a prime that doesn't contain a zero or a one and clearly 26833 qualifies in that regard. These primes form OEIS A106116:


 A106116

Primes with smallest digit > 1.                                        


If we square each of its digits we get 4366499 which is a Yarborough prime. The initial members of the sequence are:

73, 223, 233, 283, 337, 383, 523, 733, 773, 823, 2333, 2683, 2833, 2857, 3323, 3583, 3673, 3733, 3853, 5333, 6673, 6737, 6883, 7333, 7673, 7727, 7877, 8233, 8563, 8623, 22277, 22283, 22727, 23333, 23833, 25237, 25253, 25633, 26227, 26833, 27583, 27827, 27883, 32257

Here is a permalink to a SageMath algorithm that will generate the above sequence. If we can consider squares of digits then why not cubes? This leads to OEIS A296563:


 A296563

Yarborough primes that remain Yarborough primes when each of their digits are replaced by their cubes.


The initial members of the sequence are as follows (permalink):

23, 43, 73, 229, 233, 277, 449, 773, 937, 947, 2239, 2243, 2297, 2377, 2777, 3299, 3449, 3727, 3943, 4243, 4423, 4493, 7393, 7723, 7927, 7949, 9227, 9743, 9749, 22277, 22727, 22777, 22943, 23327, 23399, 23497, 23747, 24473, 24733, 27239, 27277, 27427, 27799, 29347, 29443, 29723

There aren't any fourth power Yarborough primes in the range up to one million but there are some fifth power primes in the range up to one million:

683, 2383, 2633, 2663, 6863, 26263, 32833, 36263, 36383, 62233, 63823, 63863, 68633, 68683, 88223, 222883, 232663, 266663, 338383, 386263, 622663, 623683, 632323, 633623, 633883, 663283, 683863, 822223, 828833, 836663, 863833, 866683

The following link mentions the concept of an anti-Yarborough prime and defines it as a prime that contains only zeros and ones e.g. 11 (the first such prime) and 101 (the second such prime). These primes form OEIS A020449:


 A020449

Primes whose greatest digit is 1.                             


The initial members are:

11, 101, 10111, 101111, 1011001, 1100101, 10010101, 10011101, 10100011, 10101101, 10110011, 10111001, 11000111, 11100101, 11110111, 11111101, 100100111, 100111001, 101001001, 101001011, 101100011, 101101111, 101111011, 101111111

I guess the name "Yarborough" derives from bridge where it means "a hand in bridge or whist containing no ace and no card higher than a nine" and is thus useless. The Ace can be assigned the digit 1 and so such a hand would only contain the digits 2 to 9. The name reminds me of a novel that I read in the late sixties called "Yarborough".


Here is an interesting article I found about the book and its author B. H. Friedman.