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

Sunday, 19 February 2023

Midway Between Cubics and Pronics

Recently I posted about distances to cubic numbers (In the Vicinity of Cubic Numbers) as well as the product of three consecutive integers (Infinite Sums of Reciprocals of Pronic Numbers). These latter numbers are referred to variously as pronic, promic and oblong numbers. The number associated with my diurnal age today, 26985, involves both cubic and pronic numbers and qualifies it for inclusion in OEIS A342873:


 A342873

Numbers whose distance to the nearest cube equals the distance to the nearest product of 3 consecutive integers (three-dimensional oblong).



My approach to generating the terms of this sequence, using SageMath, was to first generate, separately, the sequence of cubic numbers and the sequence of oblong numbers up to a little over 42,000. 

The sequence of 36 cubic numbers (including zero) is:

0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, 1728, 2197, 2744, 3375, 4096, 4913, 5832, 6859, 8000, 9261, 10648, 12167, 13824, 15625, 17576, 19683, 21952, 24389, 27000, 29791, 32768, 35937, 39304, 42875

The sequence of 36 oblong numbers (including zero) is:

0, 6, 24, 60, 120, 210, 336, 504, 720, 990, 1320, 1716, 2184, 2730, 3360, 4080, 4896, 5814, 6840, 7980, 9240, 10626, 12144, 13800, 15600, 17550, 19656, 21924, 24360, 26970, 29760, 32736, 35904, 39270, 42840, 46620

Combined these two sets of numbers together gives a total of 71 numbers since zero is duplicated:

0, 1, 6, 8, 24, 27, 60, 64, 120, 125, 210, 216, 336, 343, 504, 512, 720, 729, 990, 1000, 1320, 1331, 1716, 1728, 2184, 2197, 2730, 2744, 3360, 3375, 4080, 4096, 4896, 4913, 5814, 5832, 6840, 6859, 7980, 8000, 9240, 9261, 10626, 10648, 12144, 12167, 13800, 13824, 15600, 15625, 17550, 17576, 19656, 19683, 21924, 21952, 24360, 24389, 26970, 27000, 29760, 29791, 32736, 32768, 35904, 35937, 39270, 39304, 42840, 42875, 46620

Fortunately the order of these numbers, after zero, alternates from cubic to oblong and this algorithm was able to be applied in order to identify the numbers that satisfied the criterion imposed by OEIS A342873. These are the resulting numbers up to a little over 40,000:

0, 7, 16, 62, 92, 213, 276, 508, 616, 995, 1160, 1722, 1956, 2737, 3052, 4088, 4496, 5823, 6336, 7990, 8620, 10637, 11396, 13812, 14712, 17563, 18616, 21938, 23156, 26985, 28380, 32752, 34336, 39287, 41072

For example, today's number of 26985 is a distance of 15 from the nearest cubic number (27000 = 30 x 30 x 30) and the same distance from the nearest oblong numbers (26970 = 29 x 30 x 31). 

Had the two sets of numbers become jumbled up when combined, the task of identifying suitable numbers would have been more difficult. However, the oblong numbers \(n \times (n+1) \times (n+2) \) are only a little ahead of corresponding cubic numbers (\(n^3 )\) and so the problem doesn't arise.

To see that the oblong number following the cube is always less than the next cube, consider the following:$$ \begin{align} n  (n+1) (n+2) &=n^3 + 3n^2 + 2n\\(n+1)^3&=n^3+3n^2+3n+1 \end{align}$$Clearly the next cubic number is always \(n+1\) ahead of the oblong number. The same reasoning would apply if we looked at numbers that are equidistant from the nearest square number and the nearest pronic number.

The earlier algorithm is easily modified to produce these numbers that constitute OEIS A074378:


 A074378

Numbers whose distance to nearest square number equals their distance to nearest pronic number.



The modified algorithm generates these numbers:

0, 3, 5, 14, 18, 33, 39, 60, 68, 95, 105, 138, 150, 189, 203, 248, 264, 315, 333, 390, 410, 473, 495, 564, 588, 663, 689, 770, 798, 885, 915, 1008, 1040, 1139, 1173, 1278, 1314, 1425, 1463, 1580, 1620, 1743, 1785, 1914, 1958, 2093, 2139, 2280, 2328, 2475, 2525, 2678, 2730, 2889, 2943, 3108, 3164, 3335, 3393, 3570, 3630, 3813, 3875, 4064, 4128, 4323, 4389, 4590, 4658, 4865, 4935, 5148, 5220, 5439, 5513, 5738, 5814, 6045, 6123, 6360, 6440, 6683, 6765, 7014, 7098, 7353, 7439, 7700, 7788, 8055, 8145, 8418, 8510, 8789, 8883, 9168, 9264, 9555, 9653, 9950, 10050, 10353, 10455, 10764, 10868, 11183, 11289, 11610, 11718, 12045, 12155, 12488, 12600, 12939, 13053, 13398, 13514, 13865, 13983, 14340, 14460, 14823, 14945, 15314, 15438, 15813, 15939, 16320, 16448, 16835, 16965, 17358, 17490, 17889, 18023, 18428, 18564, 18975, 19113, 19530, 19670, 20093, 20235, 20664, 20808, 21243, 21389, 21830, 21978, 22425, 22575, 23028, 23180, 23639, 23793, 24258, 24414, 24885, 25043, 25520, 25680, 26163, 26325, 26814, 26978, 27473, 27639, 28140, 28308, 28815, 28985, 29498, 29670, 30189, 30363, 30888, 31064, 31595, 31773, 32310, 32490, 33033, 33215, 33764, 33948, 34503, 34689, 35250, 35438, 36005, 36195, 36768, 36960, 37539, 37733, 38318, 38514, 39105, 39303, 39900, 40100

For example, the number 14 in this sequence is an equal distance from 12 = 3 x 4 and 16 = 4 x 4. The algorithm could be extended (permalink) the other way to find numbers that are equidistant from the nearest fourth power and the number that is a product of four consecutive integers. The initial resultant numbers are not a part of any OEIS sequence but they are as follows:

0, 20, 188, 308, 1068, 1488, 3560, 4568, 8960, 10940, 18948, 22380, 35588, 41048, 61328, 69488, 99000, 110628, 151820, 167780

For example the number 20 is equidistant from 16 = 2 x 2 x 2 x 2 and 24 = 1 x 2 x 3 x 4. The algorithm could be extended indefinitely but to little purpose. Nonetheless, it's been an interesting exercise.

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.

Thursday, 29 September 2022

What's Special About 7658?

I can thank Cliff Pickover a tweet for identifying what's special about the number 7658. See Figure 1 which is a screenshot of his tweet.


Figure 1: link

So 7658 is the largest number with distinct digits that doesn't have any digits in common with its cube. 

\(7658^3 =     449103134312\)

Here is a table of all numbers with the property that there are no digits in common (permalink).

number   cube

  2        8

  3        27

  7        343

  8        512

  27       19683

  43       79507

  47       103823

  48       110592

  52       140608

  53       148877

  63       250047

  68       314432

  92       778688

  157      3869893

  172      5088448

  187      6539203

  192      7077888

  263      18191447

  378      54010152

  408      67917312

  423      75686967

  458      96071912

  468      102503232

  478      109215352

  487      115501303

  527      146363183

  587      202262003

  608      224755712

  648      272097792

  692      331373888

  823      557441767

  843      599077107

  918      773620632

  1457     3092990993

  1587     3996969003

  1592     4034866688

  4657     100999381393

  4732     105958111168

  5692     184414333888

  6058     222324747112

  6378     259449922152

  7658     449103134312

This fact got me interested in finding out the largest number with distinct digits that has no digits in common with its square. Checking in the range up to one million, which is about the limit for the online SageMathCell, I found the number to be 639172 whose square is    408540845584 (permalink). I strongly suspect that this is the largest number. So we have:

\(639172^2 =   408540845584\)

What about fourth powers? What is the largest number that, when raised to the fourth power, has no digits in common with the base number? That number turns out to be 2673.

\(2673^4 = 51050010415041\)

There doesn't appear to be any numbers satisfying the fifth power but 92 is the largest such number when sixth powers are involved:

\(92^6 =  606355001344\)

I'll leave off there. So, in summary, our investigation into what is special about 7658 led us to discover some associated numbers (92, 2673 and 639172) that are the largest possible numbers when powers of 6, 4 and 2 are considered.

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.

Friday, 2 April 2021

Luhn Primes


Today, the day before my 72nd birthday, I turned 26297 days old. Now 26297 is a prime number and in my search to find some interesting properties relating to this number, I stumble upon a book titled "Various Arithmetic Functions and their Applications" by Octavian Cira and Florentin Smarandache. What I found was that:$$26297^4+79262^4=39947578799194466417$$The rather large number on the right hand side of the above equation is also prime and this qualifies 26297 as a Luhn prime of the fourth order. However, I'm getting ahead of myself. Let's clarify what a Luhn prime is by quoting from the aforementioned book:

The number 229 is the smallest prime which summed with its inverse gives also a prime. Indeed, 1151 is a prime, and 1151 = 229 + 922. The first to note this special property of 229, on the website Prime Curios, was Norman Luhn (9 Feb. 1999), [Luhn, 2013, Caldwell and Honacher Jr., 2014].

These Luhn primes of the first rank, although simply called Luhn primes, constitute OEIS A061783:

 
 A061783



Luhn primes: primes \(p\) such that \(p + (p \text{ reversed }) \) is also a prime.          

 The sequence runs:

229, 239, 241, 257, 269, 271, 277, 281, 439, 443, 463, 467, 479, 499, 613, 641, 653, 661, 673, 677, 683, 691, 811, 823, 839, 863, 881, 20011, 20029, 20047, 20051, 20101, 20161, 20201, 20249, 20269, 20347, 20389, 20399, 20441, 20477, 20479, 20507, ...

The authors of the book ask the question as to whether there are Luhn primes of second rank? Their answer is yes, indeed. 23 is a Luhn prime number of second rank because 1553 is a prime and we have \(1553 = 23^2 + 32^2\). The sequence of such numbers forms OEIS A304390:


 A304390

Prime numbers \(p\) such that \(p^2\) + \( (p \text{ reversed })^2 \) is also prime.     

This sequence runs:

23, 41, 227, 233, 283, 401, 409, 419, 421, 461, 491, 499, 823, 827, 857, 877, 2003, 2083, 2267, 2437, 2557, 2593, 2617, 2633, 2677, 2857, 2887, 2957, 4001, 4021, 4051, 4079, 4129, 4211, 4231, 4391, 4409, 4451, 4481, 4519, 4591, 4621, 4639, 4651, 4871, 6091, 6301, 6329, 6379, 6521, 6529, 6551, ...

Interestingly there doesn't seem to be any Luhn primes of the third rank. However, as we've seen Luhn primes of the fourth order are possible and my diurnal age, 26297, is an example. These particular primes are not listed in the OEIS but, copying from the book, here is a list up to 26297:

23, 43, 47, 211, 233, 239, 263, 419, 431, 487, 491, 601, 683, 821, 857, 2039, 2063, 2089, 2113, 2143, 2203, 2243, 2351, 2357, 2377, 2417, 2539, 2617, 2689, 2699, 2707, 2749, 2819, 2861, 2917, 2963, 4051, 4057, 4127, 4129, 4409, 4441, 4481, 4603, 4679,  4733, 4751, 4951, 4969, 4973, 6053, 6257, 6269, 6271, 6301, 6311, 6353, 6449, 6547, 6551, 6673, 6679, 6691, 6803, 6869, 6871, 6947, 6967, 8081, 8123, 8297, 8429, 8461, 8521, 8543, 8627, 8731, 8741, 8747, 8849, 8923, 8951, 8969, 20129, 20149, 20177, 20183, 20903, 20921, 21017, 21613, 21661, 21727, 22073, 22133, 22171, 22817, 22853, 22877, 23531, 23767, 23827, 24251, 24421, 24481, 25307, 25321, 25343, 26171, 26267, 26297, ...

Thus they have the property that:


 OEIS candidate? 


Prime numbers \(p\) such that \(p^4\) + \( (p \text{ reversed })^4 \) is also prime.     

The authors make the comment that:

Up to \(3 \times 10^4\), the numbers: 23, 233, 419, 491, 857, 2617, 4051, 4129, 4409, 4481, 6301, 6551, 6871, 8543, 21727, 21803, 21937, 22133, 23227, 23327, 24527, 28297, 29063 are Luhn prime numbers of 2nd and 4th rank. The question of whether there are Luhn primes of rank higher than 4 is posed as a question in the book but is not answered.

The book will continue to prove useful in the future I'm sure. Here is some information about the book and its contents:

Over 300 sequences and many unsolved problems and conjectures related to them are presented herein. These notions, definitions, unsolved problems, questions, theorems corollaries, formulae, conjectures, examples, mathematical criteria, etc. on integer sequences, numbers, quotients, residues, exponents, sieves, pseudo-primes, squares, cubes, factorials, almost primes, mobile periodicals, functions, tables, prime square factorial bases, generalised factorials, generalised palindromes and so on, have been extracted from the Archives of American Mathematics (University of Texas at Austin) and Arizona State University (Tempe): "The Florentin Smarandache papers" special collections, and Arhivele Statului (Filiala Vâlcea & Filiala Dolj, Romania).

This book was born from the collaboration of the two authors, which started in 2013. The first common work was the volume "Solving Diophantine Equations", published in 2014. The contribution of the authors can be summarised as follows: Florentin Smarandache came with his extraordinary ability to propose new areas of study in number theory, and Octavian Cira - with his algorithmic thinking and knowledge of Mathcad.