Monday 9 July 2018

Pandigital Numbers Formed From the Product of a Number and its Reversal

Today I turned 25299 days old. Here is the Numbermatics representation of it.


What's interesting about this number is that a pandigital number is created when it is multiplied by its reversal:

25299 * 99252 = 2510976348

It turns out that there are 141 numbers that generate a pandigital number when multiplied by their reversal. Fifteen of them are semiprimes. These numbers form OEIS A178929:


 A178929

Numbers m such that m*reversal(m) contains every decimal digit exactly once.


I wrote some SAGE code to generate the complete list of numbers, the largest member of which is 6611100 since 661110 * 11166 = 7381954260.

Here is the code (permalink):

L=[]
count=0
for number in range(1, 700000):
    pandigital=['0','1','2','3','4','5','6','7','8','9']
    digits=list(str(number))
    digits.reverse()
    reversed=0
    index=len(digits)
    for x in digits:
        index-=1
        reversed+=Integer(x)*10^index
    product=number*reversed
    if sorted(list(str(product)))==pandigital:
        count+=1
        L.append(number)
print(L)

[14979, 19167, 19497, 19839, 20247, 20499, 21657, 21864, 22185, 22227, 22329, 25299, 25755, 26325, 28344, 28665, 29643, 32184, 32319, 32418, 32724, 32889, 34194, 34692, 35265, 35853, 36489, 36957, 39588, 41754, 42327, 42564, 42723, 43476, 43656, 44382, 44445, 44997, 45714, 45765, 45807, 45915, 46458, 46524, 46812, 47175, 48123, 49143, 51585, 51954, 52362, 53757, 54444, 55752, 56253, 56682, 56754, 57174, 58122, 58515, 61596, 61857, 65538, 65634, 65808, 67329, 67434, 69177, 69516, 70467, 70818, 70854, 71109, 72222, 72324, 73389, 74202, 75612, 75735, 75816, 75963, 76191, 76407, 77196, 79491, 79944, 80856, 81423, 81807, 83556, 84069, 84648, 85464, 88593, 90117, 91323, 92322, 92376, 92769, 93891, 96048, 96729, 97779, 97941, 98337, 98463, 98823, 99252, 99402, 111660, 115350, 128340, 131250, 132930, 141540, 144360, 147060, 148140, 151230, 154140, 158160, 159240, 162630, 175440, 252630, 321510, 362520, 362610, 392310, 414510, 418410, 429510, 438210, 445710, 451410, 521310, 535110, 607410, 618510, 634410, 661110]


on July 23rd 2021

No comments:

Post a Comment