Showing posts with label palindrome. Show all posts
Showing posts with label palindrome. Show all posts

Sunday, 12 July 2026

28224: An Interesting Number

28224 has 194 entries in the OEIS which is extraordinarily high for a five digit number. In this post I'll be discussing some of this number's most interesting properties but not all of them. There are just too many. It's prime factorisation is:$$28224=2^6 \times 3^2 \times 7^2$$FIRST INTERESTING PROPERTY

Numbers that are perfect squares are quite rare in the range up to 40000. There are only 200 of them and 28224, my diurnal age today, is one of them. It has the property that:$$28224=168^2$$The number of days between my experience of them is a little less than a year. There is a gap of exactly 365 days between \(183^2\) and \(182^2\) since:$$ \begin{align} 183^2-182^2 &= (183 + 182)(183-182) \\ &=365 \times 1 \\ &=365 \end{align}$$I'll be \(33124\) or \(182^2\) days when I'm over \(90\) years old so I may not get to experience the transition from this square to the next.

28224 is also a Loeschian number since it is equal to \(72^2+ 72 \times 120 + 120^2\).

28224 also has a product of digits (256) that is a perfect square since \(256=16^2\).

SECOND INTERESTING PROPERTY

Numbers that are the sum of two positive cubes are relatively rare in the range up to 40000. In fact, there are only 378 numbers in the range up to 40000 and 28224 is one of them because:$$28224=22^3 + 26^3$$These numbers form OEIS A004999.

THIRD INTERESTING NUMBER

Energetic numbers are numbers that can be broken into two or more substrings and expressed as a sum of (possibly different) positive powers of those substrings. They form OEIS  A055480. 28224 is one such number because:$$28224=28^3 + 2^{11} + 2^7 + 4^6$$I discuss this category of numbers in my blog post Energetic Numbers.

FOURTH INTERESTING NUMBER

Friedman numbers are positive integers which can be written in some non-trivial way using its own digits, together with the symbols + – × / ^ ( ) and concatenation. 28224 is one such number because:$$28224 = (2 + 82)^2 × 4$$It is said to be a "nice" Friedman number because the digits are in the same order as the number. These numbers are listed on my blog post Narcissistic, D-Powerfull and Friedman Numbers.

FIFTH INTERESTING NUMBER

28224 has the property that certain of its factors (not necessarily prime) can be arranged to form a palindrome. Specifically:$$2 \times 2 \times 2 \times 882 \times 2 \times 2 = 22288222$$I've written about these sorts of numbers in a post titled Why Is 313131 An Interesting Number?

SIXTH INTERESTING PROPERTY

28224 is a concatenation of powers of 2 since:$$28224= 2^1 \; || \; 2^3 \; || \; 2^1 \; || \; 2^1 \; || \; 2^2$$I've written about numbers that can be formed in this way in a blog post titled Nothing New Under The Sun. It is also a concatenation of multiples of 7 since:$$28224= (7 \times 4) \, || \, (7 \times 32)$$I posted about these sorts of concatenations in my blog post More Numbers as Concatenations.

SEVENTH INTERESTING PROPERTY

28224 is a member of OEIS A253824 where$$ \text{numbers } m = s \, || \, t \text{ such that } m = \sigma(s) \times \sigma(t)$$where || represents concatenation. In the case of 28224 we have:$$ \begin{align} 28224 &= 28 \, || \, 224 \\ &= \sigma(28) \times \sigma(224) \\ &= 56 \times 504 \\ &=28224 \end{align}$$28224 is only the third such number in the range up to 40000. The two earlier numbers are 540 and 2352.

EIGHTH INTERESTING PROPERTY

28224 has a digit sum of 18 and when this is added to the number the result is 28242 which has the same digits as 28224 but in a slightly different order. This property makes it a member of OEIS A246420.

 
 A246420

Numbers \(n\) such that \(n\)  + digit sum of \(n\) is a permutation of the decimal digits of \(n\) .


Friday, 12 June 2026

Forming Palindromes from Factors

 In a blog post titled Why Is 313131 An Interesting Number?, I remarked that:

$$ 313131=3 \times 7 \times 13 \times 31 \times 37$$If we rearrange the order of multiplication we get the following:$$ 313131=7 \times 3 \times 13 \times 31 \times 37$$Concatenating these digits we get the number \(73133137\) which is palindromic.

I went on to look at what other numbers in the range between 28000 and 29000 have this property and came up with the table shown below:


The numbers are thus relatively rare, there being only 27 in a range of 1000 numbers. This represents a density of 2.7%. The numbers are listed below:

28072, 28125, 28194, 28224, 28242, 28273, 28308, 28322, 28332, 28416, 28431, 28448, 28585, 28589, 28593, 28601, 28602, 28609, 28620, 28672, 28685, 28692, 28750, 28800, 28812, 28847, 28951

The factors under consideration here are all PRIME factors. What if we allow factors that are not necessarily prime. Take 28200 as an example:$$ \begin{align} 28200 &= 2 \times 5 \times 3 \times 2 \times 235 \times 2 \\ &\rightarrow 25322352 \end{align}$$The resultant number after concatenation of the factors is palindromic. Notice that the factor 235 is NOT prime.

It turns out that palindromes constructed in this way are relatively frequent. In the range between 28100 and 28300 (a range of only 200), the density is 15.4%. The numbers are:

28104, 28105, 28125, 28126, 28128, 28130, 28140, 28143, 28152, 28160, 28161, 28175, 28179, 28180, 28182, 28188, 28194, 28200, 28224, 28230, 28236, 28242, 28251, 28256, 28266, 28273, 28275, 28280, 28288, 28296, 28300

I've set up my multipurpose algorithm to identify such numbers when they pop up in my diurnal age analysis.

Sunday, 31 May 2026

Palindromic Day 28182

Palindromic properties of 28182 (showing only sequence members up to 40000):


A098834: palindromic Smith numbers.

4, 22, 121, 202, 454, 535, 636, 666, 1111, 1881, 3663, 7227, 7447, 9229, 10201, 17271, 22522, 24142, 28182, 33633, 38283

A Smith number is a composite number where the sum of its digits equals the sum of the digits of its prime factors. For 28182:$$ \begin{align} 28182 &\rightarrow 2+8+1+8+2 = 21 \\ 28182 &= 2 \times 3 \times 7 \times 11 \times 61\\ &\rightarrow 2 + 3 + 7 + 1+1+6 +1 =21 \end{align}$$


A046395: palindromes that are the product of 5 distinct primes.

6006, 8778, 20202, 28182

Here \(28182 = 2 \times 3 \times 7 \times 11 \times 61 \)


A099052: all palindromes of length > 1 in the decimal expansion of \(e\).

\(e\) = 2.71828182845904523536028747135266 ...


A045571: numbers that are palindromic, divisible by 11 and have an odd number of digits.

121, 242, 363, 484, 616, 737, 858, 979, 10901, 11011, 12221, 13431, 14641, 15851, 17171, 18381, 19591, 20702, 21912, 22022, 23232, 24442, 25652, 26862, 28182, 29392, 30503, 31713, 32923, 33033, 34243, 35453, 36663, 37873, 39193

All the palindromic numbers with an even number of digits are divisible by 11. The number of palindromic numbers with \(2k+1\) digits that are divisible by 11 is \((10^{k+1} + (-1)^k)/11\), and their asymptotic relative density within the set of all palindromic numbers with an odd number of digits is 1/11 (from OEIS comments).


A113838
: palindromes sandwiched between twin primes.

4, 6, 282, 828, 858, 2112, 21012, 21612, 23832, 26262, 26862, 28182

Here of course the twin primes are 28181 and 28183.


A032751
: palindromic Super-3 Numbers.

4554, 6776, 17471, 22322, 22722, 28182

Super-3 numbers \(n\) are of the form \(3 \times n^3 \) and contain three consecutive 3's.

Here \(3 \times 28182^3 = 67148557\textbf{333}704\)

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

Friday, 20 February 2026

Palindrome 28082


Figure 1: Gemini Generated

Figure 1 depicts the number associated with my diurnal age today: the palindromic cyclops number \( \textbf{28082}\). I quite like the depiction. The previous such number, 27072, occurred on the 18th May 2023 and I celebrated its occurrence with a post titled Another Palindromic Cyclops Number. Prior to this, I was 26062 days old on the 10th August 2020 and again I created a post, titled Palindromic Cyclops Numbers. These numbers occur every 1010 days except when the transition involves a new leading digit. For example, following 29092, the next palindromic cyclops number is 30003 and the two are only separated by 11 days.

The number 28082 has no outstanding or unusual properties and so in this post I'm only celebrating it in terms of it being another base 10 milestone. After repeated failures using Nano Bananas, Gemini offered to implement the graphic shown in Figure 2 using Python code. There are 28 letters in the phrase "TWENTY EIGHT THOUSAND EIGHTY TWO" and the graphic depicts this. The number in digit format consists of 28, a central 0 and then 28 reversed. There are also 28 days in this current month of February. Today is the 20th of February and the digit sum of 28082 is 20.


Figure 2: permalink

Thursday, 5 February 2026

Why Is 313131 An Interesting Number?


Recently a friend of mine who was staying at a hotel revealed that the six digit security code for the room was 313131. This looked like an easy code to crack and I was reminded of a post that I'd made recently titled Passcodes and Repeated Digits in November of 2025. Figure 1 shows the probabilities for the number of distinct digits chosen:


Figure 1

So the code 313131 is indeed easy to crack, requiring only a maximum of 62 attempts or 31 attempts on average. However, what was of most interest to me regarding 313131 was its prime factorisation:$$ 313131=3 \times 7 \times 13 \times 31 \times 37$$If we rearrange the order of multiplication we get the following:$$ 313131=7 \times 3 \times 13 \times 31 \times 37$$Concatenating these digits we get the number \(73133137\) which is palindromic.

Naturally, I wondered how many other numbers share this property and so I set Gemini to investigate this with the following prompt:

Write a program in Python, tailored for insertion into SageMathCell or a Jupyter notebook, that identifies all composite numbers from 4 up to a user chosen upper limit with the property that the prime factors, when arranged in a suitable order and then concatenated, produce a palindromic number. The default upper limit can be set to 40000. An example of such a number would be 313131 = 3 x 7 x 13 x 31 x 37 that can written as 7 x 3 x 13 x 31 x 37 to produce the palindromic number 73133137 when concatenated. The output of the program should be a table showing number and factorisation followed by a comma separated list of the qualifying numbers.

Naturally this a processor intensive process and my Jupyter notebook struggled mightily to generate the list of suitable numbers. After some time, I decided to restrict the range to between 28000 and 29000 and after further modifications by Gemini, I was able to achieve the following list of numbers:

28072, 28125, 28194, 28224, 28242, 28273, 28308, 28322, 28332, 28416, 28431, 28448, 28585, 28589, 28593, 28601, 28602, 28609, 28620, 28672, 28685, 28692, 28750, 28800, 28812, 28847, 28951

Figure 2 shows the details:


Figure 2

I've incorporated this algorithm into my daily search program that has become somewhat impressive if I do say so myself. See Figure 3 for the results of 28067, my diurnal age today.


Figure 3

The output is generated by the same program but I've just restricted the range to my daily number, rather lazy but it does the job. Remember the prime factorisation takes multiplicity into account. For completeness I'll include the Python code:

import sys

def get_prime_factors(n):
    """Returns a list of prime factors of n."""
    factors = []
    d = 2
    temp = n
    while d * d <= temp:
        while temp % d == 0:
            factors.append(d)
            temp //= d
        d += 1
    if temp > 1:
        factors.append(temp)
    return factors

def is_palindrome(s):
    """Checks if a string is a palindrome."""
    return s == s[::-1]

def distinct_permutations(iterable):
    """
    Yields unique permutations of items in iterable.
    This handles repeated elements efficiently (e.g., [2, 2, 3])
    without generating all n! redundant combinations.
    """
    # Sort the list to start with the lexicographically first permutation
    s = sorted(iterable)
    yield tuple(s)
    
    n = len(s)
    while True:
        # 1. Find the largest index i such that s[i] < s[i+1]
        i = n - 2
        while i >= 0 and s[i] >= s[i+1]:
            i -= 1
        
        if i == -1:
            return # All permutations generated
        
        # 2. Find the largest index j such that s[i] < s[j]
        j = n - 1
        while s[j] <= s[i]:
            j -= 1
        
        # 3. Swap s[i] and s[j]
        s[i], s[j] = s[j], s[i]
        
        # 4. Reverse the sequence from s[i+1] up to the end
        s[i+1:] = s[i+1:][::-1]
        
        yield tuple(s)

def find_palindromic_composites(start_n, end_n):
    results = []
    actual_start = max(4, start_n)

    for n in range(actual_start, end_n + 1):
        factors = get_prime_factors(n)
        
        # Skip primes
        if len(factors) < 2:
            continue
            
        found_property = False
        winning_perm = None
        winning_concat = None
        
        # Use the optimized generator instead of itertools.permutations
        for p in distinct_permutations(factors):
            concat_str = "".join(map(str, p))
            
            if is_palindrome(concat_str):
                found_property = True
                winning_perm = p
                winning_concat = concat_str
                break 
        
        if found_property:
            fact_str = " x ".join(map(str, winning_perm))
            results.append((n, fact_str, winning_concat))

    return results

# --- Configuration ---
LOWER_BOUND = 28000
UPPER_BOUND = 29000

# --- Main Execution ---
print(f"Searching for composite numbers between {LOWER_BOUND} and {UPPER_BOUND}...")
print("-" * 80)
print(f"{'Number':<8} | {'Valid Factor Ordering':<35} | {'Resulting Palindrome'}")
print("-" * 80)

qualifying_numbers = find_palindromic_composites(LOWER_BOUND, UPPER_BOUND)

if not qualifying_numbers:
    print(f"No qualifying numbers found in the range {LOWER_BOUND} to {UPPER_BOUND}.")
else:
    for num, factor_str, pal_str in qualifying_numbers:
        print(f"{num:<8} | {factor_str:<35} | {pal_str}")

    print("-" * 80)
    print("\nComma separated list of qualifying numbers:")
    print(", ".join(str(r[0]) for r in qualifying_numbers))

Sunday, 2 November 2025

Palindromic Day 27972

Today is palindromic day 27972 and the last palindromic day of the current millenium. The next palindromic day will occur in the new millenium and will 28082, one hundred and ten days from now.

My first observation is that the digits on either side of the central 9 also add to 9 to give a 9 - 9 - 9 pattern with 9 being the arithmetical digital root as well. This is the first and last time that such a triple pattern will occur in the current millenium. It cannot occur in the next two millenia (2 8 x 8 2 and 2 9 x 9 2) because the digits on either side of the central digit add to 10 and 11 respectively. So already 27972 is rather special. 

27972 is also a member of OEIS A344422: palindromes having more divisors than all smaller palindromes. The table below lists the initial members of this sequence and it can be seen that 27972 has a record 48 divisors.

  number   factorisation        divisors

  1        1                    1
  2        2                    2
  4        2^2                  3
  6        2 * 3                4
  44       2^2 * 11             6
  66       2 * 3 * 11           8
  252      2^2 * 3^2 * 7        18
  2112     2^6 * 3 * 11         28
  2772     2^2 * 3^2 * 7 * 11   36
  6336     2^6 * 3^2 * 11       42
  27972    2^2 * 3^3 * 7 * 37   48
  48384    2^8 * 3^3 * 7        72

27972 is also a member of OEIS A020485: least positive palindromic multiple of \(n\), or 0 if none exists. Here are the multiples for the initial values of \(n\).

  count   n       multiple
  1       1       1
  2       2       1
  3       3       1
  4       4       1
  5       5       1
  6       6       1
  7       7       1
  8       8       1
  9       9       1
  10      0       0
  11      11      1
  12      252     21
  13      494     38
  14      252     18
  15      525     35
  16      272     17
  17      272     16
  18      252     14
  19      171     9
  20      0       0
  21      252     12
  22      22      1
  23      161     7
  24      696     29
  25      525     21
  26      494     19
  27      999     37
  28      252     9
  29      232     8
  30      0       0
  31      434     14
  32      2112    66
  33      33      1
  34      272     8
  35      525     15
  36      252     7
  37      111     3
  38      494     13
  39      585     15
  40      0       0
  41      656     16
  42      252     6
  43      989     23
  44      44      1
  45      585     13
  46      414     9
  47      141     3
  48      2112    44
  49      343     7
  50      0       0
  51      969     19
  52      676     13
  53      212     4
  54      27972   518
  55      55      1
  56      616     11
  57      171     3
  58      232     4
  59      767     13
  60      0       0
  61      26962   442

27972 requires 13 steps to reach the palindrome 4964444694 under the Reverse and Add algorithm. 

27972 is a decagonal or ten-sided number and is the 84th decagonal number and the second non-trivial palindromic decagonal number after 232. See Figure 1 where 232 is shown but not 27972.


Figure 1: source

27972 is a member of OEIS A356854: palindromes that can be written in more than one way as the sum of two distinct palindromic primes. In the case of 27972 we have:

10501 + 17471 = 27972
11311 + 16661 = 27972
11411 + 16561 = 27972
12421 + 15551 = 27972

Friday, 1 August 2025

Numbers Reversed

What numbers in the range up to 40000 are palindromes formed by the multiplication of a number and its reversal? 

Let's require that the numbers being multiplied are not themselves palindromes because palindromic numbers when multiplied together always form palindromes. We find that only four numbers satisfy: 252, 20502, 23632, 26962 (see permalink). The details are shown in the table below: 


The next number is 2005002 formed by the multiplication of 1002 and 2001. All the numbers being multiplied only consist of the digits 0, 1 and 2 as far as I can tell. For example, 40220902204 is a product of 200102 and 201002. There are no other starting numbers larger than 200102 in the range up to one million because of this restriction. Above one million, the first suitable number is 1000002 which multiplied by its reversal 2000001 produces the palindrome 2000005000002. In fact, any number formed from the digits 0, 1 and 2 (that does not end in 0) will produce a palindrome when multiplied by its reversal.

We can break away from this 0, 1, 2 restriction if we ask:
What numbers in the range up to 40000 are palindromes formed by the multiplication of a number and its reversal plus 1? 
Well, once again, in the range up to 40000, there aren't many. In fact there are only 404, 575 and 737 (see permalink) with details shown in the table below.


The next number after 23 is 318317 which, when multiplied by 713813, gives 227218812722.

Tuesday, 29 July 2025

Split and Add

There's a section in the Numbers Aplenty web page that divides a number into two smaller numbers and then adds the two together to form a new number with some interesting property. For example, the number associated with my diurnal age today is 27876 and Numbers Aplenty has this to say about it:

It can be divided in two parts (27 and 876) that added together give the 42nd triangular number, specifically: 

\(27876 \rightarrow 27 + 876 = 903 = \text{T}_{42}\) 

Normally I ignore this section of the page as the operation seems a little contrived and this was initially the case yesterday when I was searching for interesting properties associated with 27875. In frustration, I turned to Gemini for help and this is the rather long-winded prompt that I gave it:

I'm trying to find something of mathematical interest about the number 27875. I've looked at the entries for the number in the OEIS (Online Encyclopedia of Integer Sequences) at oeis.org and also the information located at Numbers Aplenty (https://www.numbersaplenty.com/27875). These are my usual sources of information about the number but I'm not satisfied with the information that I found there. I'm looking for some property of the number that is quirky, curious or unique. You'll have to apply some lateral thinking and creativity to come up with such a property. Remember that the property must be mathematical but it can fall into the category of recreational mathematics rather than academic mathematics. The number may have significance or importance in an area outside of mathematics such as physics, geography, demographics etc.

Here was Gemini's response:

A particularly curious property of 27875 emerges from a simple, recreational manipulation of its digits. The number 27875 can be split into two parts: the number formed by the first three digits, 278, and the number formed by the last two digits, 75. When you add these two parts together, you get a special result:

\(278+75=353\)

The sum, 353, is a palindromic prime number—it reads the same forwards and backwards, and its only divisors are 1 and itself. palindromic primes are relatively uncommon, and finding one through this kind of "split-sum" operation is a quirky feature.


Diving Deeper 🧐

The property becomes even more unique when we look at the prime number index.

  • The number 353 is the 71st prime number.

  • The index itself, 71, is also a prime number.

This makes 353 a prime index prime, adding another layer of mathematical interest to the result derived from 27875. 

So Gemini came up with a property of the number that was already on the Numbers Aplenty web page but it did add the additional information that the palindrome was prime and that this prime had a prime index. This got me thinking as to what other five digit numbers had the property that they could be split into two parts and have the two parts add together to form a prime number with a prime index.

I developed an algorithm (permalink) to find such numbers in the range from 27875 to 40000. It turns out that there are 83 such numbers with one of them (29162) able to be split in two different ways:$$ \begin{align} 29162 &\rightarrow 29+162 =191 = \text{P}_{43} \\ 29162 &\rightarrow 291+62 =353 = \text{P}_{71} \end{align}$$Here is a list of the 83 numbers:

27875, 27892, 27974, 28163, 28172, 28271, 28325, 28469, 28568, 28667, 28766, 28769, 28865, 28891, 28964, 29162, 29162, 29261, 29324, 29459, 29558, 29657, 29756, 29768, 29855, 29954, 31142, 31241, 31322, 31439, 31538, 31637, 31736, 31766, 31835, 31888, 31934, 32132, 32159, 32231, 32321, 32429, 32528, 32627, 32726, 32765, 32825, 32887, 32924, 33122, 33158, 33221, 33419, 33518, 33617, 33716, 33764, 33815, 33886, 33914, 34112, 34157, 34211, 34319, 34763, 34885, 35156, 35318, 35762, 35884, 36155, 36317, 36761, 36883, 37154, 37316, 37882, 38153, 38315, 38759, 38881, 39152, 39314, 39758

The details are as follows:

number   first   second   palindrome   prime index

  27875    278     75       353          71
  27892    27      892      919          157
  27974    279     74       353          71
  28163    28      163      191          43
  28172    281     72       353          71
  28271    282     71       353          71
  28325    28      325      353          71
  28469    284     69       353          71
  28568    285     68       353          71
  28667    286     67       353          71
  28766    287     66       353          71
  28769    28      769      797          139
  28865    288     65       353          71
  28891    28      891      919          157
  28964    289     64       353          71
  29162    29      162      191          43
  29162    291     62       353          71
  29261    292     61       353          71
  29324    29      324      353          71
  29459    294     59       353          71
  29558    295     58       353          71
  29657    296     57       353          71
  29756    297     56       353          71
  29768    29      768      797          139
  29855    298     55       353          71
  29954    299     54       353          71
  31142    311     42       353          71
  31241    312     41       353          71
  31322    31      322      353          71
  31439    314     39       353          71
  31538    315     38       353          71
  31637    316     37       353          71
  31736    317     36       353          71
  31766    31      766      797          139
  31835    318     35       353          71
  31888    31      888      919          157
  31934    319     34       353          71
  32132    321     32       353          71
  32159    32      159      191          43
  32231    322     31       353          71
  32321    32      321      353          71
  32429    324     29       353          71
  32528    325     28       353          71
  32627    326     27       353          71
  32726    327     26       353          71
  32765    32      765      797          139
  32825    328     25       353          71
  32887    32      887      919          157
  32924    329     24       353          71
  33122    331     22       353          71
  33158    33      158      191          43
  33221    332     21       353          71
  33419    334     19       353          71
  33518    335     18       353          71
  33617    336     17       353          71
  33716    337     16       353          71
  33764    33      764      797          139
  33815    338     15       353          71
  33886    33      886      919          157
  33914    339     14       353          71
  34112    341     12       353          71
  34157    34      157      191          43
  34211    342     11       353          71
  34319    34      319      353          71
  34763    34      763      797          139
  34885    34      885      919          157
  35156    35      156      191          43
  35318    35      318      353          71
  35762    35      762      797          139
  35884    35      884      919          157
  36155    36      155      191          43
  36317    36      317      353          71
  36761    36      761      797          139
  36883    36      883      919          157
  37154    37      154      191          43
  37316    37      316      353          71
  37882    37      882      919          157
  38153    38      153      191          43
  38315    38      315      353          71
  38759    38      759      797          139
  38881    38      881      919          157
  39152    39      152      191          43
  39314    39      314      353          71
  39758    39      758      797          139

29162 occurs 2 times
29162 occurs 2 times

Friday, 25 July 2025

27872: Another Palindromic Number


For the last 800 days they've been coming around every 100 days and today marks yet another palindromic day as I turn 27872 days old. I've mentioned one of the properties of this number in my post titled Difference of Two Cubic Numbers. I noted that this palindrome is a difference of two cubes:$$27872=38^3-30^3$$Another property of this palindrome is that it is the sum of two prime palindromes in two different ways:$$ \begin{align} 27872 &= 11311 + 16561\\ &=12421 + 15451 \end{align}$$In the range up to 40000, there are only 25 palindromes with this property and these are the initial terms of OEIS A356854:

282, 484, 858, 888, 21912, 22722, 23832, 24642, 25752, 26662, 26762, 26862, 26962, 27672, 27772, 27872, 27972, 28482, 28782, 28882, 28982, 29692, 29792, 29892, 29992

27872 also has the property that it is the smallest palindrome with exactly seven prime factors, counted with multiplicity. This qualifies it for membership in OEIS A076886: smallest palindrome with exactly \(n\) prime factors (counted with multiplicity). See Figure 1 where the initial terms with their \(n\) values are listed.

Figure 1

In 100 days I'll be able to celebrate 27972 that's also a member of OEIS A356854. After that, it is only 31 days to the next palindromic day: 30003.

Tuesday, 20 May 2025

Revisiting Reverse and Add

Numbers \(n\) belonging to OEIS A063048 have the property that the Reverse and Add! trajectory of \(n\) (presumably) does not reach a palindrome and does not join the trajectory of any term \(m < n\). Up to 40,000 these numbers are:

196, 879, 1997, 7059, 10553, 10563, 10577, 10583, 10585, 10638, 10663, 10668, 10697, 10715, 10728, 10735, 10746, 10748, 10783, 10785, 10787, 10788, 10877, 10883, 10963, 10965, 10969, 10977, 10983, 10985, 12797, 12898, 13097, 13197, 13694, 14096, 14698, 15297, 15597, 18598, 18798, 19098, 20459, 30389, 30399, 30929, 30959, 30979

Now there are many more numbers that presumably do not reach a palindrome but they join the trajectories of the above numbers at some point and thus do not fulfil the \(m<n\) condition. These numbers belong to OEIS A023108: positive integers which apparently never result in a palindrome under repeated applications of the function A056964(\(x\)) = \(x\) + (\(x\) with digits reversed). 

\( \textbf{27806} \), my diurnal age today, is one such number. I tested it for 30,000 iterations and still no palindrome was found. Now 39996 is the 1750th member of the sequence and so these numbers represent 4.375% of the total numbers in the range. Some numbers coming up soon are 27812,  27837,  27847,  27866,  27896,  27906,  27912,  27914,  27956,  27964 and 27988. Between 27806 and 40,000 these numbers (which include all those in OEIS A063048) are:

27806,  27812,  27837,  27847,  27866,  27896,  27906,  27912,  27914,  27956,  27964,  27988,  28036,  28046,  28055,  28056,  28095,  28096,  28146,  28156,  28193,  28236,  28256,  28266,  28281,  28286,  28332,  28341,  28342,  28346,  28356,  28362,  28369,  28469,  28487,  28496,  28502,  28504,  28545,  28546,  28566,  28576,  28586,  28595,  28596,  28597,  28616,  28643,  28657,  28686,  28696,  28702,  28704,  28706,  28707,  28732,  28736,  28776,  28796,  28797,  28802,  28827,  28837,  28856,  28886,  28896,  28902,  28904,  28946,  28954,  28978,  29026,  29036,  29045,  29046,  29085,  29086,  29097,  29136,  29146,  29183,  29226,  29246,  29256,  29271,  29276,  29322,  29331,  29332,  29336,  29346,  29352,  29359,  29396,  29459,  29477,  29486,  29494,  29499,  29535,  29536,  29556,  29566,  29576,  29585,  29586,  29587,  29590,  29606,  29633,  29647,  29676,  29686,  29722,  29726,  29766,  29786,  29787,  29791,  29796,  29817,  29827,  29846,  29876,  29886,  29899,  29936,  29944,  29968,  29997,  30089,  30358,  30389,  30399,  30439,  30458,  30479,  30489,  30536,  30551,  30561,  30575,  30581,  30583,  30636,  30651,  30661,  30666,  30695,  30713,  30726,  30733,  30744,  30746,  30781,  30783,  30785,  30786,  30841,  30849,  30875,  30881,  30889,  30929,  30931,  30959,  30961,  30963,  30967,  30975,  30979,  30981,  30983,  31079,  31348,  31379,  31389,  31429,  31448,  31469,  31479,  31526,  31541,  31551,  31565,  31571,  31573,  31626,  31641,  31651,  31656,  31685,  31703,  31716,  31723,  31734,  31736,  31771,  31773,  31775,  31776,  31831,  31839,  31865,  31871,  31879,  31896,  31919,  31921,  31949,  31951,  31953,  31957,  31965,  31969,  31971,  31973,  32069,  32095,  32295,  32338,  32369,  32379,  32391,  32419,  32438,  32459,  32469,  32516,  32531,  32541,  32555,  32561,  32563,  32616,  32631,  32641,  32646,  32675,  32706,  32713,  32724,  32726,  32761,  32763,  32765,  32766,  32791,  32795,  32821,  32829,  32855,  32861,  32869,  32886,  32896,  32909,  32911,  32939,  32941,  32943,  32947,  32955,  32959,  32961,  32963,  32999,  33059,  33085,  33095,  33195,  33285,  33328,  33359,  33369,  33381,  33390,  33391,  33395,  33409,  33428,  33449,  33459,  33499,  33506,  33521,  33531,  33545,  33551,  33553,  33594,  33595,  33606,  33621,  33631,  33636,  33665,  33692,  33703,  33714,  33716,  33751,  33753,  33755,  33756,  33781,  33785,  33811,  33819,  33845,  33851,  33859,  33876,  33886,  33901,  33929,  33931,  33937,  33945,  33949,  33951,  33953,  33989,  33995,  34049,  34075,  34085,  34094,  34095,  34185,  34195,  34275,  34295,  34318,  34349,  34359,  34371,  34380,  34381,  34385,  34395,  34418,  34439,  34449,  34489,  34511,  34521,  34535,  34541,  34584,  34585,  34611,  34621,  34626,  34655,  34682,  34696,  34704,  34706,  34741,  34745,  34746,  34771,  34775,  34801,  34809,  34835,  34841,  34849,  34866,  34876,  34895,  34899,  34919,  34921,  34923,  34927,  34935,  34939,  34941,  34979,  34985,  34993,  35039,  35065,  35075,  35084,  35085,  35175,  35185,  35265,  35285,  35295,  35308,  35339,  35349,  35361,  35370,  35371,  35375,  35385,  35391,  35398,  35408,  35429,  35439,  35479,  35498,  35501,  35511,  35525,  35531,  35533,  35574,  35575,  35595,  35601,  35611,  35616,  35645,  35672,  35686,  35731,  35733,  35735,  35736,  35761,  35765,  35825,  35831,  35839,  35856,  35866,  35885,  35889,  35909,  35911,  35913,  35917,  35925,  35929,  35931,  35933,  35969,  35975,  35983,  35999,  36029,  36055,  36065,  36074,  36075,  36165,  36175,  36255,  36275,  36285,  36329,  36339,  36351,  36360,  36361,  36365,  36375,  36381,  36388,  36419,  36429,  36469,  36488,  36501,  36515,  36521,  36523,  36564,  36565,  36585,  36595,  36601,  36606,  36635,  36662,  36676,  36721,  36723,  36725,  36726,  36751,  36755,  36795,  36815,  36821,  36829,  36846,  36856,  36875,  36879,  36901,  36903,  36907,  36915,  36919,  36921,  36923,  36959,  36965,  36973,  36989,  36997,  37019,  37045,  37055,  37064,  37065,  37155,  37165,  37245,  37265,  37275,  37290,  37295,  37319,  37329,  37341,  37350,  37351,  37355,  37365,  37371,  37378,  37409,  37419,  37459,  37478,  37496,  37499,  37505,  37511,  37513,  37554,  37555,  37575,  37585,  37595,  37625,  37652,  37666,  37695,  37711,  37713,  37715,  37716,  37741,  37745,  37785,  37805,  37811,  37819,  37836,  37846,  37865,  37869,  37895,  37905,  37909,  37911,  37913,  37949,  37955,  37963,  37979,  37987,  37999,  38009,  38035,  38045,  38054,  38055,  38094,  38095,  38099,  38145,  38155,  38192,  38235,  38255,  38265,  38280,  38285,  38309,  38319,  38331,  38340,  38341,  38345,  38355,  38361,  38368,  38399,  38409,  38449,  38468,  38486,  38489,  38495,  38499,  38501,  38503,  38544,  38545,  38565,  38575,  38585,  38594,  38595,  38596,  38615,  38642,  38656,  38685,  38695,  38701,  38703,  38705,  38706,  38731,  38735,  38775,  38795,  38796,  38801,  38809,  38826,  38836,  38855,  38859,  38885,  38895,  38899,  38901,  38903,  38939,  38945,  38953,  38969,  38977,  38989,  39025,  39035,  39044,  39045,  39084,  39085,  39089,  39096,  39135,  39145,  39182,  39225,  39245,  39255,  39270,  39275,  39309,  39321,  39330,  39331,  39335,  39345,  39351,  39358,  39389,  39395,  39439,  39458,  39476,  39479,  39485,  39489,  39498,  39534,  39535,  39555,  39565,  39575,  39584,  39585,  39586,  39605,  39632,  39646,  39675,  39685,  39721,  39725,  39765,  39785,  39786,  39790,  39791,  39795,  39816,  39826,  39845,  39849,  39875,  39885,  39889,  39891,  39898,  39929,  39935,  39943,  39959,  39967,  39979,  39996

Thursday, 20 February 2025

An Interesting Triple 7 Number

Today I turned \( \textbf{27717} \) days old and this number has a plethora of interesting properties that deserve a special mention and thus a dedicated post. Here are some of those properties.

  • \( \textbf{27717} \) is a so-called Lucky Cube, meaning it is a number whose cubes contain the digit sequence “888”, here:$$27717^3 = 21293088810813$$The numbers that satisfy from 27717 to 40000 are: 27717, 27942, 27973, 28192, 28442, 28484, 28692, 28740, 28942, 29079, 29192, 29354, 29387, 29391, 29418, 29420, 29442, 29491, 29642, 29692, 29942, 29989.

  • \( \textbf{27717} \) is the lesser of a pair of adjacent composite numbers such that both are only one step away from their home primes. Here: 
    • \(27717 = 3 \times 9239 \rightarrow 39239\)
    • \(27718 = 2 \times 13859 \rightarrow 213859\)

  • \( \textbf{27717} \) is a number such that n + POD(n) and n - POD(n) are both prime (where POD stands for Product Of Digits). Here we have POD = 686:
    • \(27717 + 686 = 28403\) which is a prime number
    • \(27717 - 686 = 27031\) which is a prime number

  • \( \textbf{27717} \) is an interprime number because it is at equal distance from the previous prime (27701) and the next prime (27733).

  • \( \textbf{27717} \) is a number whose sum of divisors has prime factors (ignoring multiplicity) that multiply to the factorial 2310 where

    \(2310= 2 \times 3 \times 5 \times 7 \times 11\)

    Here 27717 has a sum of divisors 36960 and

    \(36960= 2^5 \times 3 \times 5 \times 7 \times 11\)

    but also forms a consecutive pair with 27718 because its sum of the divisors is 41580 and

    \(41580= 2^2 \times 3^3 \times 5  \times 7 \times11\)

    See blog post Primorials and the Sigma Function.

  • \( \textbf{27717} \) is the TENTH member of an interesting number chain (which is base independent):
    • \(27708 = 12 \times 2309\)
    • \(27709 = 11 \times 2519\)
    • \(27710 = 10 \times 2771\)
    • \(27711 = 9 \times 3079\)
    • \(27712 = 8 \times 3464\)
    • \(27713 = 7 \times 3959\)
    • \(27714 = 6 \times 4619\)
    • \(27715 = 5 \times 5543\)
    • \(27716 = 4 \times 6929\)
    • \(27717 = 3 \times 9239\)
    • \(27718 = 2 \times 13859\)
See blog post Count Down Number Chains  
 
  • \( \textbf{27717} \) is a cyclic number.

  • \( \textbf{27717} \) is a xenodrome in base 9 : 42016. See blog post Xenodromes.

  • \( \textbf{27717} \) is a number that does not reach a palindrome after 2001 cycles of the reverse and add algorithm.

  • \( \textbf{27717} \) is a D-number meaning it is a number \(n > 3\) such that n divides \( k^{n-2}- k\) for all \(1 < k < n\) relatively prime to \(n\).

  • \( \textbf{27717} \) can be rendered as a digit equation as follows: \(2 - \dfrac{7}{7} = 1 ^ 7\)