Showing posts with label sum of digits. Show all posts
Showing posts with label sum of digits. Show all posts

Friday, 7 August 2026

Sums of Digits

The number associated with my diurnal age today, 28248, has the property that its digits raised to the fourth power are equal to its totient.$$ \begin{align} 2^4 + 8^4 + 2^4 + 4^4 + 8^4 &= 8480 \\ \phi(28248) &= 8480 \end{align}$$This qualifies it for membership in OEIS A269669:


A269669
numbers whose Euler totient function is equal to the sum of some fixed power of their digits.

The numbers in this sequence are few and far between, with 28248 being the last in the range up to 40000. The initial members are 1, 2, 20, 40, 228, 352, 712, 813, 835, 2079, 4020, 28248. Take 20 as another example:$$ \begin{align} 2^3 + 0^3 &= 8 \\ \phi(20) &= 8 \end{align}$$As part of my daily number analysis, I consider:

  • the sum of the digits of a number
  • the sum of the digits squared of a number
  • the sum of the digits cubed of a number
If all three sums are prime, then I make a note of it. I consider higher powers of the digits in the context of narcissistic numbers where a narcissistic number is defined as a \(k\)-digit nonnegative number equal to the sum of the \(k\)-th powers of its digits. An example is of such a number is 9474 where:$$9474=9^4+4^4+7^4+4^4$$D-powerful numbers are similar but are defined as integers that can be expressed as a sum of positive powers of their digits. An example is 994 where:$$994=9^3+9^1+4^4$$OEIS A269669 relates such sums to a number's totient which I hadn't thought of doing before. This idea can be extended to other numbers related to a given number and I've included a list of such numbers as output from my daily number analysis. The example below is for 28248 where the equality between its totient and the sum of its digits raised to the fourth power can be clearly seen.

  Daily Number                      28248
  Sum of Divisors                   77760
  Sum of Proper Divisors            49512
  Totient                           8480
  Sum of DISTINCT prime factors     123
  Sum of Unitary Divisors           46656
  Sum of Digits                     24
  Sum of Digits Squared             152
  Sum of Digits Cubed               1104
  Sum of Digits to Fourth Power     8480
  Sum of Digits to Fifth Power      66624
  Product of Digits                 1024
  Gray Code                         22900
  Binary Complement                 4519
  Arithmetic Derivative             54620
  Determinant of Circulant Matrix   11904

Saturday, 6 June 2026

Perfect Powers

Firstly a reminder. What is a perfect power?

A perfect power is a positive integer that can be expressed as an integer power of another positive integer. More formally, \(n\) is a perfect power if there exist natural numbers \(m > 1\), and \(k > 1\) such that \(m^k = n\). In this case, \(n\) may be called a perfect \(k\)-th power. If \(k = 2\) or \(k = 3\), then \(n\) is called a perfect square or perfect cube, respectively. Sometimes 1 is also considered a perfect power (\(1^k = 1\) for any \(k\)).
Today I turned 28188 days old and one of the interesting properties of this number, apart from the digit 8 appearing three times, is that its sum of digits (SOD) and product of digits (POD) are both perfect powers. This is because:$$ \begin{align} \text{SOD}(28188) &= 27 = 3^3\\ \text{POD}(28188) &= 1024 = 2^{10 }\end{align}$$This got me thinking as to how many positive integers in the range up to 40000 have this property. Well, it turns out that there are 217 and here they are (permalink):

4, 8, 9, 18, 22, 44, 81, 88, 144, 224, 242, 333, 414, 422, 441, 448, 484, 844, 999, 1124, 1133, 1142, 1177, 1214, 1224, 1241, 1242, 1313, 1331, 1339, 1393, 1412, 1421, 1422, 1555, 1717, 1771, 1888, 1933, 2114, 2124, 2141, 2142, 2214, 2222, 2241, 2248, 2284, 2411, 2412, 2421, 2428, 2482, 2824, 2842, 3113, 3131, 3139, 3193, 3311, 3319, 3391, 3913, 3931, 4112, 4121, 4122, 4211, 4212, 4221, 4228, 4282, 4444, 4822, 5155, 5515, 5551, 7117, 7171, 7711, 8188, 8224, 8242, 8422, 8818, 8881, 8888, 9133, 9313, 9331, 11114, 11124, 11133, 11141, 11142, 11214, 11222, 11241, 11248, 11284, 11313, 11331, 11411, 11412, 11421, 11428, 11482, 11824, 11842, 12114, 12122, 12141, 12148, 12184, 12212, 12221, 12222, 12411, 12418, 12481, 12814, 12841, 12888, 13113, 13131, 13311, 13399, 13939, 13993, 14111, 14112, 14121, 14128, 14182, 14211, 14218, 14281, 14488, 14812, 14821, 14848, 14884, 18124, 18142, 18214, 18241, 18288, 18412, 18421, 18448, 18484, 18828, 18844, 18882, 19339, 19393, 19933, 21114, 21122, 21141, 21148, 21184, 21212, 21221, 21222, 21411, 21418, 21481, 21814, 21841, 21888, 22112, 22121, 22122, 22211, 22212, 22221, 22228, 22282, 22444, 22822, 24111, 24118, 24181, 24244, 24424, 24442, 24811, 28114, 28141, 28188, 28222, 28411, 28818, 28881, 31113, 31131, 31311, 31399, 31939, 31993, 33111, 33199, 33399, 33919, 33939, 33991, 33993, 39139, 39193, 39319, 39339, 39391, 39393, 39913, 39931, 39933

What about numbers whose sums of divisors are perfect powers? In the range up to 40000, there are only 18 and they are (permalink):

3, 7, 21, 31, 81, 93, 127, 217, 381, 400, 651, 889, 2667, 3937, 8191, 11811, 24573, 27559

Take 21 with divisors of 1, 3, 7 and 21 as an example:$$ \sigma(21)=32=2^5$$What about numbers whose totients are perfect powers? Let's recall that:
The totient of a number, denoted by the Euler's totient function \(\phi(n)\), is the count of positive integers less than or equal to \(n\) that are coprime (relatively prime) to \(n\). Two numbers are coprime if their only common factor is 1.
Numbers of this sort are more frequent with there being 119 in the range up to 40000. They are (permalink):

5, 8, 10, 12, 15, 16, 17, 20, 24, 30, 32, 34, 40, 48, 51, 60, 64, 68, 80, 85, 96, 102, 120, 128, 136, 160, 170, 192, 204, 240, 255, 256, 257, 272, 320, 340, 384, 408, 480, 510, 512, 514, 544, 640, 680, 768, 771, 816, 960, 1020, 1024, 1028, 1088, 1280, 1285, 1360, 1536, 1542, 1632, 1920, 2040, 2048, 2056, 2176, 2560, 2570, 2720, 3072, 3084, 3264, 3840, 3855, 4080, 4096, 4112, 4352, 4369, 5120, 5140, 5440, 6144, 6168, 6528, 7680, 7710, 8160, 8192, 8224, 8704, 8738, 10240, 10280, 10880, 12288, 12336, 13056, 13107, 15360, 15420, 16320, 16384, 16448, 17408, 17476, 20480, 20560, 21760, 21845, 24576, 24672, 26112, 26214, 30720, 30840, 32640, 32768, 32896, 34816, 34952

Let's take 20 as an example. The numbers that are coprime to 20 are 1, 3, 7, 9, 11, 13, 17, 19 and so we have we have a count of 8:$$ \phi(20)=8=2^3$$Next, let's consider the sum of the anti-divisors of a number. First let's recall what an antidivisor is using Gemini to explain in very clear terms:

An anti-divisor is a number that fails to divide a target integer by the largest possible margin. While a regular divisor divides a number evenly with no remainder, an anti-divisor leaves the most unbiased, centered remainder possible. [1, 2, 3]
The concept was first formalized by mathematician Jon Perry. [1]
Mathematical Rules
An integer \(d\) (where \(1 < d < n\)) is an anti-divisor of \(n\) if it satisfies one of the following rules: [1, 2]
    • For even values of \(d\): The number \(d\) divides \(2n\) evenly. Mathematically, we have:$$n \bmod d = \dfrac{d}{2}$$
    • For odd values of \(d\): The number \(d\) divides \(2n - 1\) or \(2n + 1\) evenly. Mathematically we have  [1, 2]:$$n \bmod d = \dfrac{d-1}{2}  \text{ or } n \bmod d = \dfrac{d+1}{2}$$
Visual Example: Anti-divisors of 20
To find the anti-divisors of \(20\), you look for numbers between \(2\) and \(19\) that fail to divide \(20\), but cleanly divide \(40\) (twice \(20\)) or \(39\)/\(41\). [1]
    • 3 is an odd anti-divisor because \(3 \times 13 = 39\), leaving a gap of \(1\) (since \(\frac{3-1}{2} = 1\), and \(20 \bmod 3 = 2\)).
    • 8 is an even anti-divisor because \(8 \times 5 = 40\). It divides \(2 \times 20\) perfectly.
    • 13 is an odd anti-divisor because \(13 \times 3 = 39\). [1]
Key Facts
    • The number 1 is never an anti-divisor, as it evenly divides all integers.
    • The number 2 has no anti-divisors.
    • Prime numbers have a limited number of anti-divisors based heavily on multiples of \(2n\). [1, 2, 3]
For a complete look at integer sequences and properties, you can explore the The Anti-Divisor - OEIS catalog. [1]

There are 20 numbers in the range up to 40000 that satisfy and these are (permalink):

6, 8, 9, 14, 36, 89, 96, 221, 541, 576, 740, 778, 1854, 2114, 2571, 10277, 13631, 16160, 16389, 39428

Let's take 39428 as an example. The antidivisors of this number are:

3, 5, 7, 8, 15, 21, 35, 105, 751, 2253, 3755, 5257, 11265, 15771, 26285

The sum of these anti-divisors is \(65536 = 2^{16}\) and so it is perfect power.

Further investigation could target:

  • the sum of the proper divisors
  • the sum of the non-divisors
  • the determinant of the circulant matrix
  • the arithmetic derivative

Saturday, 30 May 2026

Some Categories of Primes

There is a category of prime numbers with the property that when both the sum of their digits and the product of their digits is added to the number then the new, resultant numbers are also prime. An example would be 28181 with a sum of digits of 20 and a product of digits of 128 where:$$ \begin{align} 28181 + 20 &= 28201 \text{ prime} \\ 28181 + 128 &= 28309 \text{ prime} \end{align}$$In the range up to 40000, these primes have a density of 7.376% compared to all primes. Here is a list of such primes between 28000 and 40000 (permalink):

28097, 28181, 28703, 28901, 29153, 29179, 29209, 30089, 30119, 30203, 30313, 30449, 30469, 30539, 30557, 30649, 30661, 30713, 30803, 30809, 30829, 31019, 31307, 32063, 32069, 32083, 32173, 32203, 32401, 32687, 32957, 32971, 33013, 33037, 33091, 33301, 33413, 33547, 33581, 33587, 33769, 33851, 34313, 34667, 35053, 35059, 35251, 35257, 35323, 35507, 35509, 35521, 35569, 35831, 36209, 36229, 36469, 36559, 36607, 36919, 37019, 37039, 37097, 37321, 37369, 37501, 37507, 37547, 37871, 38047, 38351, 38959, 39019, 39079, 39103, 39161, 39301, 39521

These primes constitute OEIS A128717:


A128717: primes that yield another prime if one adds either the sum of its digits or the product of its digits.


Another category of prime involves its cube being pandigital, meaning that each digit from 0 to 9 occurs at least once with duplicates being permitted. Again 28181 satisfies this condition:$$28181^3 = 20753798525641$$Primes of this sort constitute:


A124629: primes \(p\) such that their cubes are pandigital.


The members of this sequence up to 40000 have a density is 1.523 % compared to all primes and these are (permalink):

5437, 6221, 7219, 8443, 10903, 11353, 15937, 17123, 18229, 19429, 20353, 20903, 20929, 21803, 21841, 21961, 22123, 22283, 22993, 23053, 23369, 23663, 24733, 25183, 25219, 25463, 26317, 26387, 26449, 27127, 27481, 28181, 28631, 28711, 28961, 29059, 29443, 29501, 30169, 31153, 31183, 32213, 32801, 33739, 33797, 33811, 33941, 34283, 35027, 35051, 35729, 35963, 36137, 36251, 36383, 36809, 36943, 37223, 37369, 37511, 37619, 37967, 38281, 38917

Another category of prime involves the average of the prime and the next prime being palindromic. Again 28181 satisfies since:$$ \frac{28181+28183}{2}=28182$$Many such primes are the lesser of a twin prime pair but not all. Primes of this sort constitute OEIS A242387:


A242387: lesser of consecutive primes whose average is a palindromic number.


The members of this sequence up to 40000 have a density of 1.213% compared to all primes and these are (permalink):

3, 5, 7, 97, 109, 281, 359, 389, 409, 509, 631, 653, 691, 743, 827, 857, 907, 937, 967, 1549, 2111, 2767, 4219, 4441, 7001, 9007, 9337, 9661, 10099, 11503, 12919, 13421, 16759, 17569, 21011, 21611, 23831, 26261, 26861, 28181, 29287, 29483, 30497, 31307, 32213, 33029, 33629, 34739, 36353, 37463, 39089

Another category of prime involves the differences between consecutive digits. Some primes have consecutive digits that differ by 6 or 7. An example is 28181 where we see that:$$ 2_{ \, 6} \, 8_{ \, 7} \, 1_{ \, 7} \, 8_{ \, 7} \, 1$$Such primes are few and far between and in the range up 40000, there are only the following:

17, 29, 71, 181, 281, 293, 607, 829, 929, 2939, 3929, 8171, 8293, 9281, 9293, 18181, 28181, 39293

Such primes belong to OEIS A048418:


A048418: primes whose consecutive digits differ by 6 or 7.


Yes another category involves totals of composite numbers between successive primes that are palindromes. 28181 qualifies once again because the next prime is its twin 28183 and the interprime number, 28182, is palindromic. Let's consider another prime, 29587. The next prime is 29599 and the composite numbers between them total 325523, a palindrome. Therefore we include 29587. These primes form OEIS A054266 with a density of only 0.8089% of the primes in the range up to 40000:


A054266: sum of composite numbers between prime \(p\) and nextprime(\(p\)) is palindromic.


The members up to 40000 are (permalink):

2, 3, 5, 109, 193, 281, 509, 661, 827, 857, 1439, 2111, 3433, 3889, 3967, 4549, 6661, 7001, 8467, 10099, 17203, 18583, 21011, 21611, 23831, 24847, 25117, 26261, 26497, 26861, 28181, 29587, 30497, 31307

We see that 28181, my diurnal age today, features in all these different categories of primes. Another category of primes (to which 28181 cannot belong) is to consider primes that only consist of non-prime digits (0, 1, 4, 6, 8 and 9). They do not contain any prime digits (2, 3, 5 or 7). Such primes belong to OEIS A034844 and comprise 5.782% of the primes up to 40000:


A034844: primes with only nonprime decimal digits.


Here are the primes up to 40000 (permalink):

11, 19, 41, 61, 89, 101, 109, 149, 181, 191, 199, 401, 409, 419, 449, 461, 491, 499, 601, 619, 641, 661, 691, 809, 811, 881, 911, 919, 941, 991, 1009, 1019, 1049, 1061, 1069, 1091, 1109, 1181, 1409, 1481, 1489, 1499, 1601, 1609, 1619, 1669, 1699, 1801, 1811, 1861, 1889, 1901, 1949, 1999, 4001, 4019, 4049, 4091, 4099, 4111, 4409, 4441, 4481, 4649, 4691, 4801, 4861, 4889, 4909, 4919, 4969, 4999, 6011, 6089, 6091, 6101, 6199, 6449, 6469, 6481, 6491, 6619, 6661, 6689, 6691, 6841, 6869, 6899, 6911, 6949, 6961, 6991, 8009, 8011, 8069, 8081, 8089, 8101, 8111, 8161, 8191, 8419, 8461, 8609, 8641, 8669, 8681, 8689, 8699, 8819, 8849, 8861, 8941, 8969, 8999, 9001, 9011, 9041, 9049, 9091, 9109, 9161, 9181, 9199, 9419, 9461, 9491, 9601, 9619, 9649, 9661, 9689, 9811, 9901, 9941, 9949, 10009, 10061, 10069, 10091, 10099, 10111, 10141, 10169, 10181, 10499, 10601, 10691, 10861, 10889, 10891, 10909, 10949, 11069, 11119, 11149, 11161, 11411, 11489, 11491, 11681, 11689, 11699, 11801, 11909, 11941, 11969, 11981, 14009, 14011, 14081, 14149, 14401, 14411, 14419, 14449, 14461, 14489, 14669, 14699, 14869, 14891, 14969, 16001, 16061, 16069, 16091, 16111, 16141, 16189, 16411, 16481, 16619, 16649, 16661, 16691, 16699, 16811, 16889, 16901, 16981, 18041, 18049, 18061, 18089, 18119, 18149, 18169, 18181, 18191, 18199, 18401, 18461, 18481, 18661, 18691, 18869, 18899, 18911, 18919, 19001, 19009, 19069, 19081, 19141, 19181, 19441, 19469, 19489, 19609, 19661, 19681, 19699, 19801, 19819, 19841, 19861, 19889, 19891, 19919, 19949, 19961, 19991

Primes beginning with 2 or 3 cannot qualify and so it is only when we reach primes beginning with 4 that membership is possible. The first of these is 40009.

We can flip this and consider only those primes that are comprised of prime digits. These form OEIS A019546:


A019546: primes whose digits are primes; primes having only {2, 3, 5, 7} as digits.


These primes have a density of 2.890% of the primes up to 40000 are they are (permalink):

2, 3, 5, 7, 23, 37, 53, 73, 223, 227, 233, 257, 277, 337, 353, 373, 523, 557, 577, 727, 733, 757, 773, 2237, 2273, 2333, 2357, 2377, 2557, 2753, 2777, 3253, 3257, 3323, 3373, 3527, 3533, 3557, 3727, 3733, 5227, 5233, 5237, 5273, 5323, 5333, 5527, 5557, 5573, 5737, 7237, 7253, 7333, 7523, 7537, 7573, 7577, 7723, 7727, 7753, 7757, 22273, 22277, 22573, 22727, 22777, 23227, 23327, 23333, 23357, 23537, 23557, 23753, 23773, 25237, 25253, 25357, 25373, 25523, 25537, 25577, 25733, 27253, 27277, 27337, 27527, 27733, 27737, 27773, 32233, 32237, 32257, 32323, 32327, 32353, 32377, 32533, 32537, 32573, 33223, 33353, 33377, 33533, 33577, 33757, 33773, 35227, 35257, 35323, 35327, 35353, 35527, 35533, 35537, 35573, 35753, 37223, 37253, 37273, 37277, 37337, 37357, 37537, 37573

Saturday, 23 May 2026

Smith Number Subsets

Smith numbers have the property that the sums of their digits are equal to the sums of the digits of their prime factors with multiplicity. Based on that criterion, the number associated with my diurnal age today, 28174, is a Smith number:$$28174=2 \times 14087$$This number however, has a further property if you look at it closely. The number and its prime factors share the same digits with the exception of the zero. This qualifies it for membership in OEIS A176670:


A176670
: composite numbers having the same digits as their prime factors (with multiplicity), excluding zero digits.

The initial members of the sequence are:

1111, 1255, 12955, 17482, 25105, 28174, 51295, 81229, 91365, 100255, 101299, 105295, 107329, 110191, 110317, 117067, 124483, 127417, 129595, 132565, 137281, 145273, 146137, 149782, 163797, 171735, 174082, 174298, 174793, 174982, 193117, 208174, 210181, 217894

The table below shows the details:

  number   digit sum   factors         sum of factors' digits

  1111     4           11 * 101        4
  1255     13          5 * 251         13
  12955    22          5 * 2591        22
  17482    22          2 * 8741        22
  25105    13          5 * 5021        13
  28174    22          2 * 14087       22
  51295    22          5 * 10259       22
  81229    22          29 * 2801       22
  91365    24          3 * 5 * 6091    24
  100255   13          5 * 20051       13
  101299   22          11 * 9209       22
  105295   22          5 * 21059       22
  107329   22          29 * 3701       22
  110191   13          101 * 1091      13
  110317   13          107 * 1031      13
  117067   22          167 * 701       22
  124483   22          281 * 443       22
  127417   22          47 * 2711       22
  129595   31          5 * 25919       31
  132565   22          5 * 26513       22
  137281   22          107 * 1283      22
  145273   22          53 * 2741       22
  146137   22          317 * 461       22
  149782   31          2 * 74891       31
  163797   33          3 * 71 * 769    33
  171735   24          3 * 5 * 107^2   24
  174082   22          2 * 87041       22
  174298   31          2 * 87149       31
  174793   31          47 * 3719       31
  174982   31          2 * 87491       31
  193117   22          113 * 1709      22
  208174   22          2 * 104087      22
  210181   13          101 * 2081      13
  217894   31          2 * 108947      31

What's interesting is that these same digits show up several times in the above table:

  • 17482 which is a permutation of the digits of 28174
  • 149782 which has the digit 9 added to the permuted digits
  • 174082 which has the digit 0 added to the permuted digits
  • 174298 which has the digit 9 added to the permuted digits
  • 174982 which has the digit 9 added to the permuted digits
  • 208174 which has the digit 0 inserted after the 2 in 28174

All these numbers are xenodromes meaning that they have no repeated digits.

The obverse of this is to find all Smith numbers that have NO digits in common with their prime factors. There are 72 of these in the range up 40000 (permalink):

4, 27, 58, 166, 454, 576, 588, 627, 648, 654, 666, 690, 706, 729, 1449, 1858, 1908, 2067, 2409, 2839, 4369, 4414, 4464, 4880, 4960, 5458, 5818, 5854, 6084, 6096, 6567, 6583, 6684, 6718, 6760, 6880, 7068, 7078, 7186, 8158, 8568, 8680, 8864, 8901, 9166, 9414, 9849, 10669, 10786, 10966, 14458, 14566, 14958, 15646, 15709, 15984, 16546, 16866, 17496, 17664, 17718, 17840, 18418, 18454, 19818, 20229, 20299, 22509, 26727, 33680, 33760, 33880

The table below shows the details:

  number   digit sum   factors              sum of factors' digits

  4        4           2^2                  4
  27       9           3^3                  9
  58       13          2 * 29               13
  166      13          2 * 83               13
  454      13          2 * 227              13
  576      18          2^6 * 3^2            18
  588      21          2^2 * 3 * 7^2        21
  627      15          3 * 11 * 19          15
  648      18          2^3 * 3^4            18
  654      15          2 * 3 * 109          15
  666      18          2 * 3^2 * 37         18
  690      15          2 * 3 * 5 * 23       15
  706      13          2 * 353              13
  729      18          3^6                  18
  1449     18          3^2 * 7 * 23         18
  1858     22          2 * 929              22
  1908     18          2^2 * 3^2 * 53       18
  2067     15          3 * 13 * 53          15
  2409     15          3 * 11 * 73          15
  2839     22          17 * 167             22
  4369     22          17 * 257             22
  4414     13          2 * 2207             13
  4464     18          2^4 * 3^2 * 31       18
  4880     20          2^4 * 5 * 61         20
  4960     19          2^5 * 5 * 31         19
  5458     22          2 * 2729             22
  5818     22          2 * 2909             22
  5854     22          2 * 2927             22
  6084     18          2^2 * 3^2 * 13^2     18
  6096     21          2^4 * 3 * 127        21
  6567     24          3 * 11 * 199         24
  6583     22          29 * 227             22
  6684     24          2^2 * 3 * 557        24
  6718     22          2 * 3359             22
  6760     19          2^3 * 5 * 13^2       19
  6880     22          2^5 * 5 * 43         22
  7068     21          2^2 * 3 * 19 * 31    21
  7078     22          2 * 3539             22
  7186     22          2 * 3593             22
  8158     22          2 * 4079             22
  8568     27          2^3 * 3^2 * 7 * 17   27
  8680     22          2^3 * 5 * 7 * 31     22
  8864     26          2^5 * 277            26
  8901     18          3^2 * 23 * 43        18
  9166     22          2 * 4583             22
  9414     18          2 * 3^2 * 523        18
  9849     30          3 * 7^2 * 67         30
  10669    22          47 * 227             22
  10786    22          2 * 5393             22
  10966    22          2 * 5483             22
  14458    22          2 * 7229             22
  14566    22          2 * 7283             22
  14958    27          2 * 3^3 * 277        27
  15646    22          2 * 7823             22
  15709    22          23 * 683             22
  15984    27          2^4 * 3^3 * 37       27
  16546    22          2 * 8273             22
  16866    27          2 * 3^2 * 937        27
  17496    27          2^3 * 3^7            27
  17664    24          2^8 * 3 * 23         24
  17718    24          2 * 3 * 2953         24
  17840    20          2^4 * 5 * 223        20
  18418    22          2 * 9209             22
  18454    22          2 * 9227             22
  19818    27          2 * 3^3 * 367        27
  20229    15          3 * 11 * 613         15
  20299    22          53 * 383             22
  22509    18          3^2 * 41 * 61        18
  26727    24          3 * 59 * 151         24
  33680    20          2^4 * 5 * 421        20
  33760    19          2^5 * 5 * 211        19
  33880    22          2^3 * 5 * 7 * 11^2   22

Friday, 3 April 2026

77th Birthday

Today I turned 77 years of age and my equivalent diurnal age is 28124 which has the following factorisation:$$28124=2 \times 2 \times 79 \times 89$$Though this number is composite, it has numerous prime number associations. Let's examine some of them beginning with its sum of digits, sum of digits squares and sum of digits cubed:$$ \begin{align} 2 + 8 + 1 + 2 + 4 &=17 \text{ (prime)} \\2^2+8^2+1^2+2^2+8^4 &= 89 \text{ (prime)} \\2^3+8^3+1^3+2^3+8^3 &= 593 \text{ (prime)} \end{align}$$The number is only one step removed from its home prime because:$$28124=2 \times 2 \times 79 \times 89 \rightarrow 227989 \text{ (prime)}$$The number is also a member of OEIS A048381: numbers such that replacing each nonzero digit with the n-th prime (replacing each 0 digit with a 1) yields a prime. Thus:$$28124 \rightarrow 319237 \text{ (prime)}$$The number has a binary complement that is prime. The binary complement of a number is determined by changing the number to binary and swapping any 0's for 1's and vice versa. Thus:$$ \begin{align} 28124_{10} &= 110110111011100_2 \\ &\rightarrow 001001000100011_2 \\ &=4643_{10} \text{ (prime)} \end{align}$$The number is quickly captured by the prime 28109 under the ODD(+) and EVEN(-) algorithm where the sum of the odd digits is added to the number and the sum of the even digits is subtracted recursively until a fixed point is reached or a loop is entered. Here is the trajectory is simply:$$ \begin{align} 28124 &\rightarrow 28124 + 1 -(2 + 8 + 2 + 4) \\ &=28124 + 1 - 16 \\ &=28109 \text{ (prime)} \end{align}$$The number can be considered as a concatenation of powers of the prime 2 because:$$ 28124 = 2^1\, | \,2^3 \,| \,2^0 \,| \,2^1 \,| \, 2^2 $$where | represents concatenation. The number can be generated by adding the prime sum (13) of the digits of the prime 28111 to itself. Thus:$$28111+13=28124$$The digits of the number can be rearranged to form the following primes:$$22481, 24281, 24821, 42281, 42821, 48221, 82241, 82421, 84221$$The position 28124 in the Recaman Sequence is reached after a prime number of iterations:$$0 \rightarrow 28124 \text{ requires } 34183 \text{ (prime) iterations}$$

Saturday, 25 October 2025

Prime Factor Fibonacci

A recent number, 27960, associated with my diurnal age has an interesting property if you look at the prime factors more closely:$$27960=2^3 \times 3 \times 5 \times 233$$Let's ignore multiplicity and look at the sum of digits of each distinct prime factor. The 2, 3 and 5 remain the same but 233 becomes 8 and the sequence of prime factors then becomes:$$2, 3, 5, 8$$This is the Fibonacci sequence. How many numbers with four prime factors (ignoring multiplicity) have this property. Well, in the range up to 40000, it turns out that there are 115. These numbers are (permalink):

510, 1020, 1530, 1590, 2040, 2130, 2550, 3060, 3180, 3210, 4080, 4260, 4590, 4770, 5100, 6120, 6360, 6390, 6420, 6990, 7314, 7530, 7650, 7950, 8160, 8520, 8670, 9180, 9540, 9630, 9798, 10200, 10650, 12240, 12720, 12750, 12780, 12840, 12930, 13038, 13770, 13980, 14310, 14628, 14766, 15060, 15090, 15300, 15630, 15900, 16050, 16320, 17040, 17085, 17340, 17466, 18360, 19080, 19170, 19260, 19596, 20400, 20970, 21030, 21300, 21942, 22590, 22950, 23850, 24480, 25440, 25500, 25560, 25680, 25860, 26010, 26076, 26322, 27540, 27960, 28620, 28890, 29256, 29394, 29532, 30120, 30180, 30600, 31260, 31800, 31830, 31950, 32100, 32154, 32637, 32640, 34080, 34530, 34638, 34680, 34932, 34950, 35445, 35511, 36690, 36720, 37650, 38160, 38250, 38340, 38520, 38790, 39114, 39192, 39750

Lets consider the last number in this list: 39750. In this case we have:$$ \begin{align} 39750 &= 2 \times 3 \times 5^3 \times 53 \\ & \rightarrow 2, 3, 5, 8 \end{align}$$If we extend the number of prime factors to five, then only one number satisfies in the range up to 40000:$$ \begin{align}34170 &= 2 \times 3 \times 5 \times 17 \times 67 \\ &\rightarrow 2, 3, 5, 8, 13 \end{align}$$However, there are 160 numbers that satisfy in the range up to one million (permalink). The algorithm actually looks for generalised Fibonacci sequences:$$a,b,c,d,e, \dots \text{ such that } c = a+b, d=b+c, e=c+d \dots$$However, all of the 160 numbers begin with 2. For example, the last of the numbers is 9988520:$$ \begin{align} 998520 &= 2^3 \times 3 \times 5 \times 53 \times 157 \\ &\rightarrow 2, 3, 5, 8, 13 \end{align} $$I tried with six prime factors but without success up to 100 million. Finally I realised that any suitable number must add to 21 and thus be divisible by 3. Such a number can never be a prime factor and so the prime factor sequence must end at 13 and can never progress further.

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.

Sunday, 14 September 2025

Sequences Involving SOD and POD

The number associated with my diurnal age today, 27923, has the interesting property that its sum of digits (23) is equal to the last two digits of the number. This number is part of a sequence of consecutive numbers that all share this same property. The numbers are 27920 up to 27929. In the range of numbers up to 40000, there are 440 numbers with this property. They are (permalink):

SOD = Concatenation of Last Two Digits

910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 4510, 4511, 4512, 4513, 4514, 4515, 4516, 4517, 4518, 4519, 5410, 5411, 5412, 5413, 5414, 5415, 5416, 5417, 5418, 5419, 6310, 6311, 6312, 6313, 6314, 6315, 6316, 6317, 6318, 6319, 7210, 7211, 7212, 7213, 7214, 7215, 7216, 7217, 7218, 7219, 8110, 8111, 8112, 8113, 8114, 8115, 8116, 8117, 8118, 8119, 9010, 9011, 9012, 9013, 9014, 9015, 9016, 9017, 9018, 9019, 9920, 9921, 9922, 9923, 9924, 9925, 9926, 9927, 9928, 9929, 10810, 10811, 10812, 10813, 10814, 10815, 10816, 10817, 10818, 10819, 11710, 11711, 11712, 11713, 11714, 11715, 11716, 11717, 11718, 11719, 12610, 12611, 12612, 12613, 12614, 12615, 12616, 12617, 12618, 12619, 13510, 13511, 13512, 13513, 13514, 13515, 13516, 13517, 13518, 13519, 14410, 14411, 14412, 14413, 14414, 14415, 14416, 14417, 14418, 14419, 15310, 15311, 15312, 15313, 15314, 15315, 15316, 15317, 15318, 15319, 16210, 16211, 16212, 16213, 16214, 16215, 16216, 16217, 16218, 16219, 17110, 17111, 17112, 17113, 17114, 17115, 17116, 17117, 17118, 17119, 18010, 18011, 18012, 18013, 18014, 18015, 18016, 18017, 18018, 18019, 18920, 18921, 18922, 18923, 18924, 18925, 18926, 18927, 18928, 18929, 19820, 19821, 19822, 19823, 19824, 19825, 19826, 19827, 19828, 19829, 20710, 20711, 20712, 20713, 20714, 20715, 20716, 20717, 20718, 20719, 21610, 21611, 21612, 21613, 21614, 21615, 21616, 21617, 21618, 21619, 22510, 22511, 22512, 22513, 22514, 22515, 22516, 22517, 22518, 22519, 23410, 23411, 23412, 23413, 23414, 23415, 23416, 23417, 23418, 23419, 24310, 24311, 24312, 24313, 24314, 24315, 24316, 24317, 24318, 24319, 25210, 25211, 25212, 25213, 25214, 25215, 25216, 25217, 25218, 25219, 26110, 26111, 26112, 26113, 26114, 26115, 26116, 26117, 26118, 26119, 27010, 27011, 27012, 27013, 27014, 27015, 27016, 27017, 27018, 27019, 27920, 27921, 27922, 27923, 27924, 27925, 27926, 27927, 27928, 27929, 28820, 28821, 28822, 28823, 28824, 28825, 28826, 28827, 28828, 28829, 29720, 29721, 29722, 29723, 29724, 29725, 29726, 29727, 29728, 29729, 30610, 30611, 30612, 30613, 30614, 30615, 30616, 30617, 30618, 30619, 31510, 31511, 31512, 31513, 31514, 31515, 31516, 31517, 31518, 31519, 32410, 32411, 32412, 32413, 32414, 32415, 32416, 32417, 32418, 32419, 33310, 33311, 33312, 33313, 33314, 33315, 33316, 33317, 33318, 33319, 34210, 34211, 34212, 34213, 34214, 34215, 34216, 34217, 34218, 34219, 35110, 35111, 35112, 35113, 35114, 35115, 35116, 35117, 35118, 35119, 36010, 36011, 36012, 36013, 36014, 36015, 36016, 36017, 36018, 36019, 36920, 36921, 36922, 36923, 36924, 36925, 36926, 36927, 36928, 36929, 37820, 37821, 37822, 37823, 37824, 37825, 37826, 37827, 37828, 37829, 38720, 38721, 38722, 38723, 38724, 38725, 38726, 38727, 38728, 38729, 39620, 39621, 39622, 39623, 39624, 39625, 39626, 39627, 39628, 39629

A plot of these numbers shows a quite regular pattern. See Figure 1.


Figure 1: permalink

Addendum: I noticed that OEIS A052018: numbers \(k\) with the property that the sum of the digits of \(k\) is a substring of \(k\) is a more general version of what I've just described.

If we consider the product of digits instead and exclude numbers with the digit 0, then only 31 numbers satisfy in the range up to 40000. These are (permalink):

POD = Concatenation of Last Two Digits

236, 315, 324, 612, 1236, 1315, 1324, 1612, 2136, 2312, 3115, 3124, 3212, 6112, 11236, 11315, 11324, 11612, 12136, 12312, 13115, 13124, 13212, 16112, 21136, 21312, 23112, 31115, 31124, 31212, 32112

Figure 2 shows a graph of these numbers.


Figure 2: permalink