Tuesday 30 July 2024

Hidden Palindromes

One of the properties of the number associated with my diurnal age today (27512) has an interesting property that is listed in its Numbers Aplenty entry. 

27512 is a number such that
27512 - product of digits (140) = 27372
a palindromic number

This is by means obvious at first glance and I wondered how many other numbers in the range up to 40,000 have this property that might formally be stated as follows:

\(n\) is a number such that
\(n\) - product of digits of \(n\) = a palindromic number

It didn't long to discover that there are 320 such numbers in the range up to 40,000. We must remember to exclude numbers containing the digit 0 because in that case the product of the digits will be zero. I'll only list the numbers here between 27512 and 40000 (permalink):

27512, 27582, 27666, 28128, 28184, 28336, 28352, 28398, 28466, 28852, 28924, 28974, 29246, 29562, 29592, 29664, 29778, 29784, 29997, 31231, 31429, 31781, 32199, 32513, 32563, 32627, 32631, 32717, 32753, 33341, 33427, 33477, 33619, 33981, 34237, 34453, 34629, 34691, 34831, 34939, 34953, 35273, 35323, 35483, 35543, 35663, 35813, 35963, 36139, 36563, 36777, 36796, 36888, 36968, 37241, 37419, 38261, 38353, 38593, 38747, 38817, 38867, 38931, 39287, 39489, 39617, 39779

Having subtraced the product of a number's digits, it's natural to consider adding this same product instead of subtracting it. Thus we are searching now for numbers with the property that:

\(n\) is a number such that
\(n\) + product of digits of \(n\) = a palindromic number

There are 305 such numbers in the range up to 40000 with this property and again I've only listed the numbers in a selected range, here between 27889 and 40000 (permalink)

27889, 28452, 28477, 28563, 28572, 28583, 28616, 28624, 28797, 28867, 28953, 29269, 29352, 29377, 29512, 29553, 29593, 31271, 31523, 31641, 31667, 31961, 31989, 32187, 32211, 32353, 32499, 32671, 32841, 32999, 34189, 34277, 34319, 34553, 34647, 34749, 34781, 35383, 35443, 35579, 35623, 35984, 36439, 36563, 36617, 36641, 36648, 36778, 36876, 36911, 36968, 37621, 37686, 37854, 37898, 37959, 37981, 38229, 38311, 38453, 38584, 38717, 38868, 38936, 39231, 39454, 39498, 39524, 39579, 39632, 39646, 39754

Let's take the first number in the previous list, 27889, we see that:

27889 is a number such that
27889 + product of digits (8064) = 35953
a palindromic number

What about numbers that become palindromic when the product of digits is both subtracted and added? We are looking for numbers with these criteria:

\(n\) is a number such that
\(n\) - product of digits of \(n\) = a palindromic number
\(n\) + product of digits of \(n\) = a palindromic number

It turns out that there are 15 of these in the range up 40000, most but not all being palindromic themselves. They are:

1, 2, 3, 4, 247, 252, 348, 843, 15451, 25152, 25252, 25352, 25452, 36563, 36968

Let's take 25452, palindromic itself, as an example:

25452 is a number such that
25452 - product of digits (400) = 25052
25452 + product of digits (400) = 25852
both are palindromic numbers

We can do the same thing with the sum of the digits of a number by subtracting or adding the sum to the number itself. There are 499 and 507 palindromes respectively that result from these two processes. The earlier algorithm is easily modified to generate a list of these numbers. Thus we can search for:

\(n\) is a number such that
\(n\) - sum of digits of \(n\) = a palindromic number

Here is a list of numbers satisfying this criterion from 28800 to 40000 (permalink):

28800, 28801, 28802, 28803, 28804, 28805, 28806, 28807, 28808, 28809, 29610, 29611, 29612, 29613, 29614, 29615, 29616, 29617, 29618, 29619, 30310, 30311, 30312, 30313, 30314, 30315, 30316, 30317, 30318, 30319, 31120, 31121, 31122, 31123, 31124, 31125, 31126, 31127, 31128, 31129, 32840, 32841, 32842, 32843, 32844, 32845, 32846, 32847, 32848, 32849, 33650, 33651, 33652, 33653, 33654, 33655, 33656, 33657, 33658, 33659, 34460, 34461, 34462, 34463, 34464, 34465, 34466, 34467, 34468, 34469, 35270, 35271, 35272, 35273, 35274, 35275, 35276, 35277, 35278, 35279, 36080, 36081, 36082, 36083, 36084, 36085, 36086, 36087, 36088, 36089, 36990, 36991, 36992, 36993, 36994, 36995, 36996, 36997, 36998, 36999, 38600, 38601, 38602, 38603, 38604, 38605, 38606, 38607, 38608, 38609, 39410, 39411, 39412, 39413, 39414, 39415, 39416, 39417, 39418, 39419

Let's take the first of these as an example:

27889 is a number such that
27889 - sum of digits (18) = 28782
a palindromic number

Next we can for look numbers meeting the following criterion:

\(n\) is a number such that
\(n\) + sum of digits of \(n\) = a palindromic number

Here is a list of such numbers in the range from 27547 to 40000 (permalink): 

27547, 27651, 27746, 27850, 27945, 28063, 28158, 28262, 28357, 28461, 28556, 28660, 28755, 28954, 29072, 29167, 29271, 29366, 29470, 29565, 29764, 29859, 29963, 29973, 30000, 30086, 30190, 30285, 30484, 30579, 30683, 30778, 30882, 30991, 31095, 31104, 31294, 31303, 31389, 31493, 31502, 31588, 31692, 31701, 31787, 31891, 31900, 32009, 32113, 32199, 32208, 32312, 32398, 32407, 32511, 32597, 32606, 32710, 32796, 32805, 33018, 33122, 33217, 33321, 33416, 33520, 33615, 33814, 33909, 34027, 34131, 34226, 34330, 34425, 34624, 34719, 34823, 34918, 35036, 35140, 35235, 35434, 35529, 35633, 35728, 35832, 35927, 36045, 36244, 36339, 36443, 36538, 36642, 36737, 36841, 36936, 37054, 37149, 37253, 37348, 37452, 37547, 37651, 37746, 37850, 37945, 38063, 38158, 38262, 38357, 38461, 38556, 38660, 38755, 38954, 39072, 39167, 39271, 39366, 39470, 39565, 39764, 39859, 39963, 39973, 40000

Let's take 27547 as an example:

27547 is a number such that
27547 + sum of digits (25) = 
27572
a palindromic number

What about numbers that result in palindromes when the sum of digits is subtracted and added? We are looking for numbers with these criteria:

\(n\) is a number such that
\(n\) - sum of digits of \(n\) = a palindromic number
\(n\) + sum of digits of \(n\) = a palindromic number

There are 23 such numbers in the range up to 40000 with some but not all being palindromic themselves (permalink):

1, 2, 3, 4, 10, 100, 105, 181, 262, 267, 343, 348, 424, 429, 681, 762, 767, 843, 848, 924, 929, 1000, 10000

Let's take 1000 as an example:

1000 is a number such that
1000 - sum of digits (1) = 999
1000 + sum of digits (1) = 1001
both are palindromic numbers

I've written about sequences arising from numbers in combination with their sum of digits (SoD) or product of digits (PoD) in earlier posts such as:
I've also written extensively about palindromes in posts such as:

No comments:

Post a Comment