Showing posts with label cubed. Show all posts
Showing posts with label cubed. Show all posts

Thursday, 9 October 2025

Another Prime To Remember

In November of 2024, I created a post titled A Prime To Remember. The prime on that occasion was 27617 and you can read about its properties by following the link. I think it's time to celebrate another prime and that prime is \( \textbf{27947}\). I sometimes struggle to find a single interesting property for the number, on any given day, that is associated with my diurnal age. With 27947 I had no such problem.

First and foremost, it has the property that the sum of its digits, the sum of the squares of its digits and the sum of cubes of its digits are all prime. Thus we have:

  • \(2+7+9+4+7 = 29\) 
  • \(2^2+7^2+9^2+4^2+7^2 = 199\)
  • \(2^3+7^3+9^3+4^3+7^3 = 1487\)
This property affords it membership in OEIS A176179 and there are 322 such numbers in the range up to 40,000. 27947 shares this property with 27617 and so it is included in my blog post A Prime To Remember

27947 also has the property that the absolute differences between successive pairs of digits, and also the first and last digits, are all prime. I discuss these sorts of primes in my blog post titled Fun With Primes and Digit Pairs. Thus we have:
  • \( | 2 - 7 | = 5\)
  • \(| 7 - 9 | = 2\)
  • \(| 9 - 4 | = 5\)
  • \(| 7 - 2 | = 5\)
This property affords it membership in OEIS A087593. This next property relates to the prime producing quadratic polynomial \( (4n-29)^2 + 58 \). This polynomial generates 28 distinct primes in succession from \(n=1\) to \(n=28\). When \(n=49\), the polynomial produces the prime 27947. This property affords it membership of OEIS A320772. See my blog post Another Prime Generating Polynomial.

Still on the subject of primes, 27947 has the property that it is a balanced prime of order 100 and thus a member of OEIS A363168. A prime \(p\) is in this sequence if the sum of the 100 consecutive primes just less than \(p\), plus \(p\), plus the sum of the 100 consecutive primes just greater than \(p\), divided by 201 equals \(p\). In the case of 27947, we have:$$ \begin{align} p_{3050} &= 27947 \\ p_{2950} &= 26891\\ p_{3150} &= 28933\\ \sum_{n=2950}^{3049} p_n &=2742922 \\ \sum_{n=3051}^{3150} p_n &= 2846478 \\ \text{average } &= \frac{ 2742922+27947 + 2846478}{201} \\ &= 27947 \end{align}$$See my blog post titled Varieties of Balanced Primes.

Thursday, 10 July 2025

A Peculiarity

Sometimes, when looking for properties of the number associated with my diurnal age, I struggle to find a property that interests me. Today was one such occasion and the number was 27857. However, I did notice a "peculiarity" as I call it and it involved both the sum of the number's digits cubed and the number's proper divisors. Firstly, the digits cubed:$$ \begin{align} 27857 &\rightarrow 2^3+7^3+8^3+5^3+7^3\\ &=1331 \end{align}$$Next, let's consider the number's proper divisors:$$ \begin{align} 27857 &\rightarrow 1, 89, 313 \text{ as proper divisors} \\ \text{sum of proper divisors }&=403 \\ &=13 \times 31 \\ &\rightarrow 1331 \text{ when concatenated} \end{align} $$

This peculiarity is quite rare and in fact up to \( \textbf{one hundred million} \), there is only one other number with this same property and that is 150809. The details are:$$ \begin{align} 150809 &\rightarrow 1^3+5^3+0^3+8^3+0^3+9^3\\ &=1367\\ \\150809 &\rightarrow 1, 239, 631 \text{ as proper divisors} \\ \text{sum of proper divisors }&=871 \\ &=13\times 67 \\ &\rightarrow 1367 \text{ when concatenated} \end{align} $$So 27857 has a very interesting property after all, even if it is rather obscure. I still find it rather amazing that I was able to check up to one hundred million using SageMath on my M1 Macbook Air.

Tuesday, 22 April 2025

More On Sums of Digits

Not long ago, in December of 2024, I created a post titled Prime Sums Of Digits, Digits Squared And Digits Cubed in which I looked at numbers that have a sum of digits, a sum of digits squared and a sum of digits cubed that are all prime. There are 1985 such numbers in the range up to 40000 and 322 of them are prime themselves.

In this post I want to look at numbers that not only meet the just mentioned criteria but have the additional property that, when these sums are added to the original number, the result is also prime. Here are the criteria that such numbers must meet with \( \text{SOD} \) standing for Sum Of Digits:

  • \( \text{SOD}\) of number is prime
  • \( \text{SOD}^2\) of number is prime
  • \( \text{SOD}^3\) of number is prime
  • number + \( \text{SOD} \) is prime
  • number + \( \text{SOD}^2\) is prime
  • number + \( \text{SOD}^3\) is prime
As it turns out, there are only 19 such numbers in the range up to 40000 and only the first two of them are prime (permalink): 

11, 101, 166, 4490, 4528, 4630, 6016, 8254, 8788, 10066, 12422, 13166, 18284, 18688, 20854, 25570, 31166, 32518, 36064

The first composite number is 166 so let's check that it satisfies the criteria:
  • \( \text{SOD} \) is prime: 13
  • \( \text{SOD}^2 \) is prime: 73
  • \( \text{SOD}^3 \) is prime: 433
  • 166 + 13 = 179 is prime
  • 166 + 73 = 239 is prime
  • 166 + 433 = 599 is prime
Interestingly, six of the above numbers survive the addition of a further criterion, namely that:
  •  \( \text{SOD}^4 \) is prime
  • number + \( \text{SOD}^4\) is prime
These numbers are 11, 101, 4528, 6016, 10066, 20854 (permalink) and we have to look at much larger numbers to find any that satisfy yet another criterion, namely:
  •  \( \text{SOD}^5 \) is prime
  • number + \( \text{SOD}^5\) is prime
The only two numbers that satisfy this additional criteria are 100001 and 104930. The former number is not prime but composite since 100001 = 11 x 9091. It would be interesting to see how much further this process could be taken but we would then be looking at very large numbers indeed.

Tuesday, 18 February 2025

Special Primes

I'm surprised that I haven't written about these sorts of primes before. The primes form OEIS A092529:


A092529
  primes \(p\) such that both the digit sum of \(p\) plus \(p\) and the digit product of \(p\) plus \(p\) are also primes (zeroes are not permitted).

Up to 40000, there are 136 such primes and they are (permalink):

163, 233, 293, 431, 499, 563, 617, 743, 1423, 1483, 1489, 1867, 2273, 2543, 2633, 3449, 4211, 4217, 4273, 4547, 4729, 5861, 6121, 6529, 6637, 6653, 6761, 6857, 6949, 7681, 8273, 8431, 8837, 8839, 9649, 9689, 11251, 11657, 11677, 11897, 12379, 12553, 13163, 13457, 13523, 13697, 13729, 13877, 13879, 14423, 14533, 14537, 14957, 15121, 15217, 15277, 15361, 15413, 15451, 15619, 15727, 15859, 16319, 16427, 16993, 17183, 17299, 17837, 18229, 18287, 18517, 19381, 19457, 19583, 21379, 21467, 21577, 21737, 21751, 21977, 21991, 22123, 22259, 22369, 22549, 22921, 23117, 23269, 23599, 23719, 24499, 24527, 25111, 25153, 25577, 25771, 25847, 25913, 25997, 26251, 26699, 26927, 27427, 28181, 29153, 29179, 32173, 32687, 32957, 32971, 33413, 33547, 33581, 33587, 33769, 33851, 34313, 34667, 35251, 35257, 35323, 35521, 35569, 35831, 36229, 36469, 36559, 36919, 37321, 37369, 37547, 37871, 38351, 38959, 39161, 39521

Let's just check the first number in this sequence, 163. The digit sum is 10 and the digit product is 18. Now 163 + 10 = 173 which is prime and 163 + 18 = 181 is also prime.

Interestingly if we consider subtraction instead of addition then no such primes exist. That is to say that, even up to one million, there are no primes such that \(p\) minus the digit sum of \(p\) and \(p\) minus the digit product of \(p\) are also primes (with zeroes not permitted). I'm not sure why this is so.

We can thin the ranks of the above primes if we require that the sum and product of the squares of the digits also form primes when added to the original prime. Only four numbers such satisfy all these criteria in the range up to 40000. These are 1423, 13697, 14533 and 33413 (permalink). Let's examine the first of these numbers 1423. The sum of digits is 10 and the product is 24. The digits squared are 1, 16, 4 and 9 with a sum of 30 and a product of 576. Thus we have:

  • 1423 + 10 = 1433 (prime)
  • 1423 + 24 = 1447 (prime)
  • 1423 + 30 = 1453 (prime)
  • 1423 + 576 = 1999 (prime)

If we extend the range up to one million, there are 48 numbers that satisfy:

1423, 13697, 14533, 33413, 53419, 57529, 61991, 71569, 91129, 125789, 128153, 132527, 132679, 143477, 149161, 159463, 223423, 238649, 275929, 284831, 288493, 297613, 316343, 337261, 343639, 367819, 375227, 441797, 447791, 498733, 512521, 573829, 574969, 582937, 613673, 626723, 722333, 723923, 728681, 735283, 746533, 748883, 752273, 762539, 766531, 836917, 869951, 872959

To thin this sequence further, let's impose additional criteria, specifically that the number plus the sum of the cubes of the digits and the number plus the product of the cubes of the digits must be prime as well. Here are the numbers up to one million: 125789, 132527, 573829 and 752273. Let's look at the first of these numbers, 125789:

  • 125789 + 32 = 125821 (prime)
  • 125789 + 5040 = 130829 (prime)
  • 125789 + 224 = 126013 (prime)
  • 125789 + 25401600 = 25527389 (prime)
  • 125789 + 1718 = 127507 (prime)
  • 125789 + 128024064000 = 128024189789 (prime)
Notice how the product of the squares and cubes of the digits are larger than the number itself. If we remove the requirement that the initial number be prime then a few more numbers satisfy the criteria for digits, digits squared and digits cubed. These are 13969, 65821, 125789, 132527, 349789, 537881, 545123, 573829 and 752273 (primes are shown in red).

Thursday, 24 August 2023

Sum of Digits Cubed to the Rescue

Just as I struggled with finding something of interest about 27164, as reported in my post titled Circulant Matrix to the Rescue, I similarly struggled in finding something of interest about 27168. This really bugged me but try as I may I could not find anything really interesting after several days of trying.

Finally however, after playing around with the individual digits of the numbers on either side of 27168, I noticed that the sum of digits cubed ( \( \text{SOD}^3\)) were both prime. Specifically I discovered that:$$ \begin{align} 27167 \rightarrow 2^3+7^3+1^3+6^3+7^3 &= 911\\27169 \rightarrow 2^3+7^3+1^3+6^3+9^3 &= 1297 \end{align} $$Both 911 and 1297 are prime but the \( \text{SOD}^3\) of 27168 is not because we have:$$27168 \rightarrow 2^3+7^3+1^3+6^3+8^3 = 1080$$It is very rare to have three numbers in a row whose \( \text{SOD}^3\) are prime. In the range up to one million, there are only four such groups of three numbers with the middle numbers being 1100, 10100, 100100 and 110000 and all having 2 as their \( \text{SOD}^3\). For example, take the group 1099, 1100 and 1101 where we have:$$ \begin{align} 1099 \rightarrow 1^3 + 0^3+9^3+9^3 &=1459\\1100 \rightarrow 1^3 + 1^3+0^3+0^3 &=2\\1101 \rightarrow 1^3 + 1^3+0^3+1^3 &= 3 \end{align}$$So having three numbers in a row whose \( \text{SOD}^3\) are prime is hardly an interesting sequence but what about numbers like 27168 with adjacent numbers that have this property.  Well, up to one million, there are 22045 such numbers representing 2.2045% of the range (permalink). I won't list them all here but up to 40,000, the 1137 numbers are (permalink):

112, 114, 123, 147, 165, 183, 213, 222, 237, 255, 264, 282, 288, 297, 327, 336, 354, 363, 417, 462, 486, 495, 525, 534, 552, 567, 576, 585, 615, 624, 633, 642, 657, 693, 756, 783, 813, 822, 828, 846, 855, 873, 888, 927, 945, 963, 996, 1012, 1014, 1023, 1047, 1065, 1083, 1102, 1104, 1111, 1113, 1122, 1128, 1131, 1146, 1173, 1203, 1212, 1218, 1272, 1311, 1377, 1407, 1416, 1443, 1494, 1500, 1593, 1605, 1713, 1722, 1737, 1782, 1803, 1872, 1944, 1953, 2013, 2022, 2037, 2055, 2064, 2082, 2088, 2097, 2103, 2112, 2118, 2172, 2202, 2226, 2271, 2307, 2343, 2400, 2433, 2442, 2475, 2505, 2556, 2574, 2583, 2604, 2712, 2721, 2745, 2754, 2802, 2808, 2853, 2907, 3027, 3036, 3054, 3063, 3111, 3177, 3207, 3243, 3306, 3375, 3384, 3423, 3498, 3504, 3603, 3663, 3672, 3717, 3735, 3762, 3834, 3900, 3948, 3993, 4017, 4062, 4086, 4095, 4107, 4116, 4143, 4194, 4200, 4233, 4242, 4275, 4323, 4398, 4413, 4422, 4581, 4602, 4725, 4806, 4851, 4905, 4914, 4938, 4992, 5025, 5034, 5052, 5067, 5076, 5085, 5100, 5193, 5205, 5256, 5274, 5283, 5304, 5481, 5502, 5526, 5553, 5571, 5607, 5667, 5706, 5724, 5751, 5805, 5823, 5841, 5913, 6015, 6024, 6033, 6042, 6057, 6093, 6105, 6204, 6303, 6363, 6372, 6402, 6507, 6567, 6633, 6657, 6666, 6675, 6684, 6732, 6765, 6864, 6903, 7056, 7083, 7113, 7122, 7137, 7182, 7212, 7221, 7245, 7254, 7317, 7335, 7362, 7425, 7506, 7524, 7551, 7632, 7665, 7803, 7812, 7887, 8013, 8022, 8028, 8046, 8055, 8073, 8088, 8103, 8172, 8202, 8208, 8253, 8334, 8400, 8406, 8451, 8505, 8523, 8541, 8664, 8703, 8712, 8787, 8808, 8877, 9027, 9045, 9063, 9096, 9144, 9153, 9207, 9348, 9393, 9405, 9414, 9438, 9492, 9513, 9603, 9900, 9906, 9933, 9942, 10012, 10014, 10023, 10047, 10065, 10083, 10102, 10104, 10111, 10113, 10122, 10128, 10131, 10146, 10173, 10203, 10212, 10218, 10272, 10311, 10377, 10407, 10416, 10443, 10494, 10500, 10593, 10605, 10713, 10722, 10737, 10782, 10803, 10872, 10944, 10953, 11002, 11004, 11011, 11013, 11022, 11028, 11031, 11046, 11073, 11101, 11103, 11112, 11118, 11121, 11127, 11145, 11163, 11172, 11202, 11208, 11211, 11217, 11244, 11301, 11334, 11343, 11367, 11400, 11406, 11415, 11424, 11433, 11442, 11451, 11499, 11541, 11592, 11613, 11637, 11697, 11703, 11712, 11895, 11952, 11967, 11985, 12003, 12012, 12018, 12072, 12102, 12108, 12111, 12117, 12144, 12225, 12261, 12333, 12342, 12348, 12393, 12399, 12414, 12432, 12438, 12474, 12582, 12621, 12678, 12687, 12702, 12744, 12768, 12852, 12867, 12885, 12900, 12933, 13011, 13077, 13101, 13134, 13143, 13167, 13200, 13233, 13242, 13248, 13293, 13314, 13323, 13332, 13413, 13422, 13428, 13446, 13455, 13473, 13491, 13545, 13617, 13662, 13707, 13743, 13923, 13941, 14007, 14016, 14043, 14094, 14100, 14106, 14115, 14124, 14133, 14142, 14151, 14199, 14214, 14232, 14238, 14274, 14313, 14322, 14328, 14346, 14355, 14373, 14391, 14403, 14412, 14436, 14445, 14454, 14463, 14487, 14496, 14511, 14535, 14544, 14643, 14685, 14724, 14733, 14847, 14865, 14883, 14904, 14931, 14946, 14991, 15093, 15099, 15141, 15192, 15282, 15345, 15411, 15435, 15444, 15576, 15756, 15774, 15822, 15888, 15897, 15903, 15912, 15987, 16005, 16113, 16137, 16197, 16221, 16278, 16287, 16317, 16362, 16443, 16485, 16599, 16632, 16683, 16728, 16773, 16791, 16827, 16845, 16863, 16896, 16917, 16971, 16986, 17013, 17022, 17037, 17082, 17103, 17112, 17202, 17244, 17268, 17307, 17343, 17424, 17433, 17556, 17574, 17628, 17673, 17691, 17754, 17763, 17778, 17802, 17961, 18003, 18072, 18195, 18252, 18267, 18285, 18300, 18447, 18465, 18483, 18522, 18588, 18597, 18627, 18645, 18663, 18696, 18702, 18825, 18843, 18858, 18885, 18915, 18957, 18966, 19044, 19053, 19152, 19167, 19185, 19233, 19299, 19323, 19341, 19404, 19431, 19446, 19491, 19503, 19512, 19587, 19617, 19671, 19686, 19761, 19815, 19857, 19866, 19941, 19998, 20013, 20022, 20037, 20055, 20064, 20082, 20088, 20097, 20103, 20112, 20118, 20172, 20202, 20226, 20271, 20307, 20343, 20400, 20433, 20442, 20475, 20505, 20556, 20574, 20583, 20604, 20712, 20721, 20745, 20754, 20802, 20808, 20853, 20907, 21003, 21012, 21018, 21072, 21102, 21108, 21111, 21117, 21144, 21225, 21261, 21333, 21342, 21348, 21393, 21399, 21414, 21432, 21438, 21474, 21582, 21621, 21678, 21687, 21702, 21744, 21768, 21852, 21867, 21885, 21900, 21933, 22002, 22026, 22071, 22125, 22161, 22206, 22215, 22224, 22251, 22284, 22332, 22383, 22446, 22455, 22473, 22482, 22521, 22545, 22578, 22581, 22611, 22701, 22743, 22758, 22824, 22833, 22842, 22851, 23007, 23043, 23100, 23133, 23142, 23148, 23193, 23199, 23232, 23283, 23313, 23322, 23331, 23403, 23412, 23418, 23445, 23454, 23487, 23496, 23544, 23553, 23676, 23700, 23766, 23799, 23823, 23847, 23892, 23913, 23946, 23982, 24033, 24042, 24075, 24114, 24132, 24138, 24174, 24246, 24255, 24273, 24282, 24303, 24312, 24318, 24345, 24354, 24387, 24396, 24402, 24426, 24435, 24462, 24471, 24486, 24525, 24534, 24594, 24642, 24705, 24714, 24723, 24741, 24798, 24822, 24837, 24846, 24882, 24936, 24954, 24978, 25005, 25056, 25074, 25083, 25182, 25221, 25245, 25278, 25281, 25344, 25353, 25425, 25434, 25494, 25506, 25533, 25599, 25704, 25728, 25773, 25803, 25812, 25821, 25887, 25944, 26004, 26121, 26178, 26187, 26211, 26376, 26442, 26718, 26736, 26772, 26817, 27012, 27021, 27045, 27054, 27102, 27144, 27168, 27201, 27243, 27258, 27366, 27405, 27414, 27423, 27441, 27498, 27504, 27528, 27573, 27618, 27636, 27672, 27753, 27762, 27948, 28002, 28008, 28053, 28152, 28167, 28185, 28224, 28233, 28242, 28251, 28323, 28347, 28392, 28422, 28437, 28446, 28482, 28503, 28512, 28521, 28587, 28617, 28815, 28842, 28857, 28884, 28899, 28932, 29007, 29133, 29313, 29346, 29382, 29436, 29454, 29478, 29544, 29748, 29832, 29997, 30027, 30036, 30054, 30063, 30111, 30177, 30207, 30243, 30306, 30375, 30384, 30423, 30498, 30504, 30603, 30663, 30672, 30717, 30735, 30762, 30834, 30900, 30948, 30993, 31011, 31077, 31101, 31134, 31143, 31167, 31200, 31233, 31242, 31248, 31293, 31314, 31323, 31332, 31413, 31422, 31428, 31446, 31455, 31473, 31491, 31545, 31617, 31662, 31707, 31743, 31923, 31941, 32007, 32043, 32100, 32133, 32142, 32148, 32193, 32199, 32232, 32283, 32313, 32322, 32331, 32403, 32412, 32418, 32445, 32454, 32487, 32496, 32544, 32553, 32676, 32700, 32766, 32799, 32823, 32847, 32892, 32913, 32946, 32982, 33006, 33075, 33084, 33114, 33123, 33132, 33213, 33222, 33231, 33312, 33321, 33354, 33381, 33453, 33468, 33495, 33534, 33543, 33558, 33600, 33648, 33675, 33684, 33699, 33705, 33765, 33804, 33831, 33864, 33945, 34023, 34098, 34113, 34122, 34128, 34146, 34155, 34173, 34191, 34203, 34212, 34218, 34245, 34254, 34287, 34296, 34353, 34368, 34395, 34416, 34425, 34443, 34452, 34467, 34494, 34515, 34524, 34533, 34542, 34557, 34593, 34638, 34647, 34665, 34683, 34713, 34791, 34827, 34863, 34908, 34911, 34926, 34935, 34944, 34953, 34971, 35004, 35145, 35244, 35253, 35334, 35343, 35358, 35415, 35424, 35433, 35442, 35457, 35493, 35523, 35538, 35547, 35565, 35583, 35655, 35682, 35688, 35778, 35853, 35862, 35868, 35943, 36003, 36063, 36072, 36117, 36162, 36276, 36300, 36348, 36375, 36384, 36399, 36438, 36447, 36465, 36483, 36555, 36582, 36588, 36603, 36612, 36645, 36663, 36687, 36702, 36726, 36735, 36771, 36834, 36843, 36852, 36858, 36867, 36894, 36984, 37017, 37035, 37062, 37107, 37143, 37266, 37299, 37305, 37365, 37413, 37491, 37578, 37602, 37626, 37635, 37671, 37758, 37761, 37776, 37941, 38034, 38100, 38223, 38247, 38292, 38304, 38331, 38364, 38427, 38463, 38553, 38562, 38568, 38634, 38643, 38652, 38658, 38667, 38694, 38700, 38883, 38922, 38964, 39048, 39093, 39099, 39123, 39141, 39213, 39246, 39282, 39345, 39408, 39411, 39426, 39435, 39444, 39453, 39471, 39543, 39684, 39741, 39822, 39864, 39903, 39996

So next time I get stuck on a number with seemingly no interesting properties I have this \( \text{SOD}^3\) property to call on as well as the determinant of the number's circulant matrix.