Showing posts with label pandigital. Show all posts
Showing posts with label pandigital. Show all posts

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

Wednesday, 6 May 2026

Pandigital Products

Yesterday I turned 28156 days old and this number has an interesting property:$$28156 = 4 \times 7039$$The factorisation shown is not the prime factorisation but, looking at both sides of the equation, it can be seen that each of the digits from 0 to 9 occurs exactly once. This makes the number a member of OEIS A370970:


A370970
: numbers \(k\) which have a factorization \(k = f_1 \times f_2 \times \ldots \times f_n \) where the digits of \({k, f_1, f_2, \ldots, f_n}\) together give \(0,1, \ldots ,9\) exactly once.

Here is the complete list of terms:

8596 = 2 x 14 x 307

8790 = 2 x 3 x 1465

9360 = 2 x 4 x 15 x 78

9380 = 2 x 5 x 14 x 67

9870 = 2 x 3 x 1645

10752 = 3 x 4 x 896

12780 = 4 x 5 x 639

14760 = 5 x 9 x 328

14820 = 5 x 39 x 76

15628 = 4 x 3907

15678 = 39 x 402

16038 = 27 x 594 = 54 x 297

16704 = 9 x 32 x 58

17082 = 3 x 5694

17820 = 36 x 495 = 45 x 396

17920 = 8 x 35 x 64

18720 = 4 x 5 x 936

19084 = 52 x 367

19240 = 8 x 37 x 65

20457 = 3 x 6819

20574 = 6 x 9 x 381

20754 = 3 x 6918

21658 = 7 x 3094

24056 = 8 x 31 x 97

24507 = 3 x 8169

25803 = 9 x 47 x 61

26180 = 4 x 7 x 935

26910 = 78 x 345

27504 = 3 x 9168

28156 = 4 x 7039

28651 = 7 x 4093

30296 = 7 x 8 x 541

30576 = 8 x 42 x 91

30752 = 4 x 8 x 961

31920 = 5 x 76 x 84

32760 = 8 x 45 x 91

32890 = 46 x 715

34902 = 6 x 5817

36508 = 4 x 9127

47320 = 8 x 65 x 91

58401 = 63 x 927

65128 = 7 x 9304 

65821 = 7 x 9403

These numbers are few and far between as can be seen and 28156 in particular recurs with permuted digits as 15628, 21658, 28651, 65128 and 65821.

Saturday, 6 July 2024

Hidden Pandigitals

When we think of pandigital numbers, it is a number like 1263480759 that comes to mind. Each of the digits from 0 to 9 occur exactly once. There are 3,265,920 such numbers (leading zeroes not being considered) out of the total of 3,486,784,401 possible ten digit numbers. That's a representation of about 0.094%.

There are however, other ways in which pandigital numbers can arise and one way is in the decimal approximations of the square roots of whole numbers when approximated to ten digits NOT ten decimal places. Some of the digits will occur in the whole number part of the square root and the rest will occur in the decimal part. An example is the square root of 1362 where we have:$$ \sqrt{1362}=36.90528417 \dots$$Note that the final digit arises from truncation of the infinite decimal and not from rounding. Essentially, the decimal point is ignored and so associated with certain whole numbers are their pandigital square roots expressed as whole numbers themselves with the decimal points ignored. The complete list of such numbers, up to 40000, is as follows:$$ \begin{align} 1362 &\rightarrow 3690528417\\1843 &\rightarrow 4293017586\\2540 &\rightarrow 5039841267\\4280 &\rightarrow 6542170893\\5507 &\rightarrow 7420916385\\6896 &\rightarrow 8304215796\\14601 &\rightarrow 1208345976\\15143 &\rightarrow 1230568974\\17547 &\rightarrow 1324650897\\18393 &\rightarrow 1356207948\\20337 &\rightarrow 1426078539\\22710 &\rightarrow 1506983742\\23560 &\rightarrow 1534926708\\25887 &\rightarrow 1608943752\\27487 &\rightarrow 1657920384\\30728 &\rightarrow 1752940386\\32286 &\rightarrow 1796830542\\32615 &\rightarrow 1805962347\\33144 &\rightarrow 1820549367\\34499 &\rightarrow 1857390642\\37194 &\rightarrow 1928574603 \end{align} $$Of course it's easy enough to see where the decimal point should be. These numbers form OEIS A113507 (permalink). We can extend this idea to cube roots and in so doing the first number to make an appearance is 2017 because:$$ (2017)^{1/3}=12.63480759 \dots$$The numbers up to 40000 are (permalink):$$ \begin{align} 2017 &\rightarrow 1263480759\\3053 &\rightarrow 1450693287\\9950 &\rightarrow 2150837964\\15139 &\rightarrow 2473806519\\15533 &\rightarrow 2495083671\\18357 &\rightarrow 2637954108\\24214 &\rightarrow 2893047156\\24424 &\rightarrow 2901386574\\31457 &\rightarrow 3156742089\\32654 &\rightarrow 3196284750\\39605 &\rightarrow 3408657291 \end{align} $$These numbers form OEIS A119517. This approach can be extended to fourth roots and beyond. We can also consider whole numbers raised to let's say \(1/ \pi \). For example:$$3638^{1/ \pi}=  13.59746028 \dots$$jUpt to 40000, the following whole numbers lead to pandigitals when raised to the power \(1/ \pi\):$$ \begin{align} 3638 &\rightarrow 1359746028\\7109 &\rightarrow 1682940375\\10271 &\rightarrow 1892064735\\11572 &\rightarrow 1965273840\\13818 &\rightarrow 2079431586\\14435 &\rightarrow 2108547963\\20539 &\rightarrow 2359047168\\20981 &\rightarrow 2375089614\\26220 &\rightarrow 2549731608\\27158 &\rightarrow 2578419036\\27313 &\rightarrow 2583094176\\35022 &\rightarrow 2795816403\\35330 &\rightarrow 2803619574\\35901 &\rightarrow 2817964035\\37023 &\rightarrow 2845703691 \end{align} $$Not surprisingly this sequence of numbers is not found in the OEIS.

Sunday, 2 June 2024

World of Numbers

Today I came across an interesting website via a link in an OEIS entry for 27454, the number associated with my diurnal age as of today's date. Figure 1 shows a screenshot.

Figure 1

The link provided to P. De Geest's  Nine Digits Digressions takes us to a particular page on the World of Numbers website. Figure 2 shows the page and Figure 3 shows the home page of the website.


Figure 2


Figure 3

Looking at the website, I immediately thought that it was one of those websites that had been created in the 1990s and then abandoned. However, a closer look showed that it had been created in 1996 but updated on June 2nd 2024 which is the date on which I'm creating this post. So remarkably the site has been maintained from 1996 to 2024 by P. De Geest.

So who is P. De Geest? Well his site provides a not-so-recent photo and a brief bio:


Photo taken in 2004

E-mail: pdg@worldofnumbers.com 
Web Page: http://www.worldofnumbers.com/index.html 

My name is Patrick De Geest, born on the 9th of October 1956, in Wezembeek-Oppem, Belgium (about 10 km east of Brussels), unmarried, mildly myopic, graduated in architecture but never practiced the profession. Currently I'm an employee working in the aircargo export sector (National Airport Zaventem). I didn't lose my interest in beautiful patterns and proportions though, and managed to transfer it to the field of numbers. 

Also, through the years, I gradually became familiar with the use of personal computers (no, I'll never sell my first Sinclair ZX81) and learned for programming techniques (basic, assembly, ...). All these 'creativities' culminated recently in a website about recreational mathematics with 'palindromes' as the main topic. I opted for palindromes not because of my length (181 cm), my average weight (77 kg) or my housenumber (141) but because I was attracted by their overall symmetry and the fact that it was a novel and thus insufficiently studied subject. Thanks to many contributors from all over the world the site is still expanding. 

For the rest I'm a rather quiet individual who likes to read an occasional book, watch a movie, listen to classical music, travel once or twice a year to a near/far exotic  destination and bike from time to time when the weather permits.

Anyway the point is that the site contains a wealth of information about curious number properties with Patrick giving the following overview of the site's contents:

In this well-filled website you'll find a multitude of facts and figures about topics from the  World!Of Numbers . Don't look for a logical order. It is an amalgamation of randomly gathered numbers, curios, puzzles, palindromes, primes, gems, your much valued contributions and more general information. Enjoy! Patrick De Geest  

Like Taneja's papers described in my previous post, there is great content here for future posts to this blog. Getting back to the original OEIS sequence, we see that:

\(27454^ {0.25} = 12.\overline{87215934}68573\)

The first nine digits of the decimal part do indeed contain all the digits from 1 to 9. Interestingly I can find no reference to these sorts of calculations of page 7 of "Nine Digits" topic. Perhaps it's on one of the other pages. Numbers like 27454 are part of OEIS A034279:


 A034279

Decimal part of \(a(n)^{1/4}\) starts with a 'nine digits' anagram.


The sequence begins: 7396, 8751, 8933, 8950, 9070, 11184, 26484, 26522, 27454, 30858, 36923, 39895, 40828, 42793, 47311, 58738, 58985, 61143, 72788, 73506, 75636, 79562, 80138, 80260, 81101, 83261, 94796, 96256, 101915, 102189, 103310, 103416, 108901

There's no reason to restrict ourselves to the fourth root and there are sequences corresponding to numbers raised to  1/2, 1/3, 1/5, 1/6, 1/7 and 1/8 powers and probably more. Here is a permalink to a general purpose algorithm that will generate sequences for any power desired. The relevant OEIS sequences are:
  • square root: OEIS A034277 with initial members being 86, 868, 1278, 5211, 7494, 7772, 14567, 17573, 18421, 20844, 24960, 26535, 29172, 29301, 29987, 32845

  • cube root: OEIS A034278 with initial members being 429, 939, 7015, 11456, 15221, 17521, 21000, 21160, 22397, 24789, 28916, 30945, 33743, 35440, 36732

  • fifth root: OEIS A034280 with initial members being 12, 1635, 2112, 6905, 15376, 18660, 18795, 20085, 21086, 21447, 22064, 23077, 23540, 25817, 27040, 28204, 30668, 31258, 31287, 37407, 38533

  • sixth root: OEIS A034281 with initial members being 648, 695, 1979, 7509, 9214, 12567, 19740, 21555, 24235, 24646, 25624, 27427, 30717, 30748

  • seventh root: OEIS A034282 with initial members being 551, 574, 2998, 8265, 9407, 10357, 12459, 15885, 20480, 26103, 26134, 29297, 35096, 35984, 37113, 39084, 39733, 39735

  • eighth root: OEIS A034283 with initial members being 3927, 4176, 10041, 10827, 13575, 15544, 15853, 17244, 20154, 24759, 25146, 30008, 30038, 30635, 30692, 32046, 37215
That's enough I think. Remember that there are factorial 9 ways to arrange the nine digits and this equals 362880, an impressive number of permutations.

Saturday, 30 March 2024

Very Special Five Digit Numbers

Analysing the number associated with my diurnal age means that since I turned 10000 days old, those numbers have always contained five digits and will continue to do so for the remainder of my life. Today I turned 27391 days old and that number has a very special quality.


What's obvious at first glance is that all the digits are distinct but less obvious is the fact the absolute values of the differences between successive pairs of digits, which are digits themselves, are also distinct and are different to the digits of the number. As there are four such differences between the five digits of the number, this means that all the digits from 1 to 9 make an appearance.$$ \underbrace{|2-7|}_{5} \, \underbrace{|7-3|}_{4} \, \underbrace{|3-9|}_{6} \, \underbrace{|9-1|}_{8}$$Numbers of this sort belong to OEIS A365257:


 A365257

The five digits of a(\(n\)) and their four successive absolute first differences are all distinct.


The OEIS comments state that:
The digit 0 is never present in a(\(n\)) and never appears as a first difference (as this would duplicate in both cases one of the 8 remaining digits involved).

The sequence ends with a(96) = 98274.

The only prime numbers with this property are 39157, 49681, 51869, 53719, 62983, 68749, 68947, 75193, 78259, 89627 and 95287.

The 96 members of this sequence are:

14928, 15829, 17958, 18259, 18694, 18695, 19372, 19375, 19627, 25917, 27391, 27398, 28149, 28749, 28947, 34928, 35917, 37289, 37916, 38926, 39157, 39578, 43829, 45829, 47289, 47916, 49318, 49681, 49687, 51869, 53719, 57391, 57398, 58926, 59318, 59681, 59687, 61973, 61974, 62983, 62985, 67958, 68149, 68749, 68947, 69157, 69578, 71952, 71953, 72691, 72698, 74619, 74982, 74986, 75193, 75196, 76859, 78259, 78694, 78695, 81394, 81395, 81539, 82941, 82943, 85179, 85629, 85971, 85976, 86749, 87269, 87593, 87596, 89372, 89375, 89627, 91647, 91735, 92658, 92834, 92851, 92854, 93518, 94182, 94186, 94768, 94782, 94786, 95281, 95287, 95867, 96278, 96815, 97158, 98273, 98274

As can be seen, I'm due to experience another such number in a week from today when I reach 27398 days old. My forthcoming 75th birthday, when I am 27394 days old, thus falls between these two special five digit numbers. 

Thursday, 21 March 2024

A Sequence With Only Eight Members

The idea popped into my head to look for numbers that together with their prime factors contain all the digits exactly once. This proved to be a relatively straight forward exercise. Up to one million, there are only eight numbers that qualify. These numbers together with their factorisations are as follows (permalink):

  • \(10968 = 2^3 \times 3 \times 457 \)
  • \(28651 = 7 \times 4093 \)
  • \(43610 = 2 \times 5 \times 7^2 \times 89 \)
  • \(48960 = 2^6 \times 3^2 \times 5 \times 17 \)
  • \(50841 = 3^3 \times 7 \times 269 \)
  • \(65821 = 7 \times 9403 \)
  • \(80416 = 2^5 \times 7 \times 359 \)
  • \(90584 = 2^3 \times 13^2 \times 67 \)
If repeated prime factors are disallowed, then only \(28651\) and \(65821\) qualify. These eight numbers, as I subsequently discovered, make up OEIS A124668:


 A124668

Numbers that together with their prime factors contain every digit exactly once.



So this is the sequence with only eight members: 10968, 28651, 43610, 48960, 50841, 65821, 80416, 90584.

Friday, 31 March 2023

Digitally Balanced Numbers

I've recently made a post about Balanced Numbers on March 24th 2023. Shortly, I'll turn 27027 days old and 27027 is a balanced number because to the left and right of the zero, the sum of the digits is the same:$$ 27027 = \overbrace{27}^{2+7=9} \cdot 0 \cdot \overbrace{27}^{2+7=9} \text{ is a balanced number}$$On the other hand, a digitally balanced number in base \(b\) is a number in which all the digits \(0, 1, 2, \dots , (b-1) \) occur an equal number of times. The number associated with my diurnal age today is 27025 and this number is digitally balanced in base 6, being equal to 325041.$$27025_{10}=325041_6 \text{ is digitally balanced in base 6}$$This property qualifies it for membership in OEIS A049357:


 A049357

Digitally balanced numbers in base 6: equal numbers of 0's, 1's, ..., 5's.    



The smallest such number will be \(102345_6 = 8345_{10} \) and the largest, with each digit occurring once, is \(543210_6 = 44790_{10}\). There are 600 digitally balanced numbers in this range so I won't list them all here but I'll provide a permalink to generate these numbers using SageMathCell. Numbers Aplenty provides a list of the first 600 digitally balanced numbers in any base. The same source illustrates the smallest 3 × 3 magic square made of consecutive balanced numbers in any base and which corresponds to which corresponds to the nine consecutive numbers 14924, 14917, 14922, 14919, 14921, 14923, 14920, 14925, and 14918. See Figure 1.

Figure 1: source

I must confess to having given digitally balanced numbers scant attention over the years, even though Numbers Aplenty regularly lists their occurrence. Numbers can be digitally balanced in more than one base. Below is a list of numbers that are digitally balanced in bases 2 and 4 (permalink):

Base 2    Base 10     Base 4

10000111 --> 135 --> 2013
10001101 --> 141 --> 2031
10010011 --> 147 --> 2103
10011100 --> 156 --> 2130
10110001 --> 177 --> 2301
10110100 --> 180 --> 2310
11000110 --> 198 --> 3012
11001001 --> 201 --> 3021
11010010 --> 210 --> 3102
11011000 --> 216 --> 3120
11100001 --> 225 --> 3201
11100100 --> 228 --> 3210

The algorithm listed earlier is easily  modified to accommodate other bases. For example, in base 7, the smallest number will be
\(1023456_7=123717_{10}\) and the largest, with each digit occurring once, will be \(6543210_7= 800667_{10}\). There are 4320 numbers in the range and they form part of OEIS A049358 (permalink):


 A049358

Digitally balanced numbers in base 7: equal numbers of 0's, 1's, ..., 6's.         
  


There is an overlap between digitally balanced numbers and pandigital numbers. When the digits in a digitally balanced number occur only once, then it is a pandigital number because its digits span all the possible digits in the number base. So \(27025_{10}=325041_6\) is pandigital in base 6 as well as being digitally balanced in that base.

Saturday, 11 June 2022

My Yearly Pronic Number

Pronic numbers are numbers of the form \(n \times (n+1) \) where \(n\) is an integer \( \geq 1\). Thus the first such number is 2. Here are the pronic numbers up to 40,000:

2, 6, 12, 20, 30, 42, 56, 72, 90, 110, 132, 156, 182, 210, 240, 272, 306, 342, 380, 420, 462, 506, 552, 600, 650, 702, 756, 812, 870, 930, 992, 1056, 1122, 1190, 1260, 1332, 1406, 1482, 1560, 1640, 1722, 1806, 1892, 1980, 2070, 2162, 2256, 2352, 2450, 2550, 2652, 2756, 2862, 2970, 3080, 3192, 3306, 3422, 3540, 3660, 3782, 3906, 4032, 4160, 4290, 4422, 4556, 4692, 4830, 4970, 5112, 5256, 5402, 5550, 5700, 5852, 6006, 6162, 6320, 6480, 6642, 6806, 6972, 7140, 7310, 7482, 7656, 7832, 8010, 8190, 8372, 8556, 8742, 8930, 9120, 9312, 9506, 9702, 9900, 10100, 10302, 10506, 10712, 10920, 11130, 11342, 11556, 11772, 11990, 12210, 12432, 12656, 12882, 13110, 13340, 13572, 13806, 14042, 14280, 14520, 14762, 15006, 15252, 15500, 15750, 16002, 16256, 16512, 16770, 17030, 17292, 17556, 17822, 18090, 18360, 18632, 18906, 19182, 19460, 19740, 20022, 20306, 20592, 20880, 21170, 21462, 21756, 22052, 22350, 22650, 22952, 23256, 23562, 23870, 24180, 24492, 24806, 25122, 25440, 25760, 26082, 26406, 26732, 27060, 27390, 27722, 28056, 28392, 28730, 29070, 29412, 29756, 30102, 30450, 30800, 31152, 31506, 31862, 32220, 32580, 32942, 33306, 33672, 34040, 34410, 34782, 35156, 35532, 35910, 36290, 36672, 37056, 37442, 37830, 38220, 38612, 39006, 39402, 39800

I've marked the pronic number 26732 = 163 x 164 in bold because that is my diurnal age today (June 11th 2022) and this fact is what prompted me to make this post. The previous such number (26406 = 162 x 163) occurred on Tuesday, July 20th 2021 and the next (27060 = 164 x 165) will occur on Friday, May 5th 2023. So at the moment, a pronic number appearing as my diurnal age is pretty much a yearly thing and as such should be celebrated.

Pronic numbers are also called oblong numbers, rectangular numbers or heteromecic numbers. Interestingly, the sum of the reciprocals of the pronic numbers is 1. Thus:$$\sum_{n=1}^{\infty} \frac{1}{n(n+1)}=1$$I've written about numbers of this sort before in a post titled Pronic Pandigital Numbers and Beyond on July 23rd 2021. Over 80% of pronic numbers are abundant but 26732 is deficient. In fact, of the 199 numbers in the list above, only 35 are deficient. These are:

2, 110, 182, 506, 1406, 1892, 2162, 2756, 3422, 3782, 4556, 5402, 6806, 7310, 8930, 9506, 11342, 11990, 14042, 14762, 17030, 17822, 18632, 20306, 21170, 22052, 22952, 24806, 26732, 27722, 29756, 31862, 32942, 36290, 37442

This sequence of numbers forms part of OEIS A077804:

 
 A077804

Deficient oblong numbers.                                                           


The generating function for the pronic numbers is:$$\frac{2x}{(1-x)^3}=2x+6x^2+12x^3+20x^4+ \dots$$Pronic numbers are also figurate numbers of the form:$$P_n=2T_n=n(n+1)$$where \(T_n\) is the \(n^{th}\) triangular number. A very few pronic numbers are palindromic. The first few are listed below:

2, 6, 272, 6006, 289982, 2629262, 6039306, 27999972, 28233282, 2704884072, 20278187202, 20591819502, 2592587852952, 2936231326392, 21809166190812, 27237788773272, 229145919541922, 233552101255332, 250087292780052, 2243922442293422, 2570769009670752, 20333113431133302, 27785925652958772

These numbers form OEIS A028337:


 A028337



Palindromes of the form n(n+1).                                             

Saturday, 1 January 2022

Partially Pandigital Numbers

I've written about pandigital numbers before, specifically in posts named and dated:

An example of a number that forms a palindrome when multiplied by its reversal is 25299 x 99252 = 2510976348 where the digits from 0 to 9 appear and each only once. I was stimulated to propose an extension or modification of this idea of "pandigitalism" when confronted with finding some interesting properties of the number 26571.

It seems to be a number sorely lacking in interesting properties until I was reminded when consulting Number Academy that when this number is doubled it contains the digits from 1 to 5 with each digit occurring only once. In other words 26571 x 2 = 53142. I've chosen to refer to such an occurrence as "partially pandigital" and this property of 26571 can be generalised as follows:  

S040: Five digit numbers (not including leading zeros) that, when doubled, contain only the five digits 1, 2, 3, 4 and 5 in any order.  (link)

There are 36 members of this sequence and they are:

10677, 10767, 11577, 11757, 12567, 12657, 15627, 15726, 15762, 15771, 16077, 16257, 17076, 17256, 17562, 17571, 17607, 17706, 20676, 20766, 21576, 21756, 22566, 22656, 25617, 25662, 25671, 25716, 26067, 26157, 26562, 26571, 26607, 26706, 27066, 27156

Unlike squaring or multiplication by the reversal, these numbers arise somewhat simply by merely doubling. All the numbers have a digital root of 3 which is to be expected because the digital root of a number containing the digits 1, 2, 3, 4 and 5 is 6.

Of course, the five digits don't need to be sequential but things are more interesting when they are. Let's consider the digits 5, 6, 7, 8 and 9.

S041: Five digit numbers (not including leading zeros) that, when doubled, contain only the five digits 5, 6, 7, 8 and 9 in any order. (link)

There are 48 members of this sequence and they are:

28399, 28489, 28849, 28948, 28984, 28993, 29398, 29488, 29839, 29884, 29893, 29938, 32899, 32989, 33799, 33979, 34789, 34879, 37849, 37948, 37984, 37993, 38299, 38479, 39298, 39478, 39784, 39793, 39829, 39928, 42898, 42988, 43798, 43978, 44788, 44878, 47839, 47884, 47893, 47938, 48289, 48379, 48784, 48793, 48829, 48928, 49288, 49378

An example is 28399 that when doubled gives 56798. All the numbers have a digital root of 4 which is to be expected because the digital root of a number containing the digits 5, 6, 7, 8 and 9 is 8.

I've developed a flexible algorithm (permalink) in SageMath that allows the number of multiples to be varied along with the matching digits. Here is an example using a multiple of 4 and matching digits 0, 1, 2, 3 and 4:

L=[]
multiple=4
S=[0,1,2,3,4]
for n in [10000..int(100000/multiple)]:
d=n*multiple
if sorted(d.digits())==S:
L.append(n)
print("There are",len(L),"such numbers. They are:")
print(L)
for n in L:
print(n,"-->",n*multiple)

There are 6 such numbers. They are:
[10033, 10078, 10258, 10330, 10753, 10780]
10033 --> 40132
10078 --> 40312
10258 --> 41032
10330 --> 41320
10753 --> 43012
10780 --> 43120

Here we see for example that 10033 x 4 = 40132.

Once again, we see that seemingly uninteresting numbers do have interesting properties awaiting discovery if we are persistent enough in our investigation. I've written on this theme only recently in my post titled Unremarkable Numbers on November 25th 2021 and in AD and BC Numbers on December 3rd 2021.

Monday, 23 August 2021

Polydivisible or Magic Numbers

Today I turned 26440 days old and discovered a new type of number, one termed polydivisible or magic. Here is a definition from Wikipedia:

In mathematics a polydivisible number (or magic number) is a number in a given number base with digits \(abcde \dots \) that has the following properties:

  • Its first digit \(a\) is not 0.
  • The number formed by its first two digits \(ab\) is a multiple of 2.
  • The number formed by its first three digits \(abc\) is a multiple of 3.
  • The number formed by its first four digits \(abcd\) is a multiple of 4.
  • etc.
To put it in formal mathematical terms, we have:

Let \(n\) be a natural number, and let \(k = \lfloor \log_{b}{n} \rfloor + 1\) be the number of digits in \(n\) written in base \(b\). The number \(n\) is a polydivisible number if for all \(0 \leq i < k\):$$\frac{n - (n \bmod b^{k - i - 1})}{b^{k - i - 1}} \equiv 0 \pmod i$$Using the initiall less formal, definition it can be seen that 26440 qualifies because:
  • the first digit 2 is not 0
  • the number formed by its first two digits 26 is a multiple of 2
  • the number formed by its first three digits 264 is a multiple of 3
  • the number formed by its first four digits 2644 is a multiple of 4
  • the number formed by its first five digits 26440 is a multiple of 5
The polydivisible numbers in base 10 form OEIS A144688 and though defined differently, it amounts to the same thing:


 A144688

"Magic" numbers: all numbers from 0 to 9 are magic; a number >= 10 is magic if it is divisible by the number of its digits and the number obtained by deleting the final digit is also magic.


The OEIS comments tell us that there are exactly 20457 terms, the largest of which is the 25-digit number 3608528850368400786036725. For any given base \(b\), there are only a finite number of polydivisible numbers. After 26440, the next polydivisible number is 26445 followed by 26480, 26485 and then a relatively large gap to 26720. In the range up to 26440, about 2.7% of numbers are polydivisible.

Figure 1 shows the distribution of the number of polydivisible numbers with \(n\) digits. These numbers form OEIS A143671.


Figure 1: permalink

From Wikipedia we learn that:
Polydivisible numbers represent a generalisation of the following well-known problem in recreational mathematics:

Arrange the digits 1 to 9 in order so that the first two digits form a multiple of 2, the first three digits form a multiple of 3, the first four digits form a multiple of 4 etc. and finally the entire number is a multiple of 9.

The solution to the problem is a nine-digit polydivisible number with the additional condition that it contains the digits 1 to 9 exactly once each. There are 2,492 nine-digit polydivisible numbers, but the only one that satisfies the additional condition is:

381 654 729
Numberphile made a video about this polydivisible number.


Wikipedia also list the following problems associated with polydivisible numbers:
  • Finding polydivisible numbers with additional restrictions on the digits - for example, the longest polydivisible number that only uses even digits is 48000688208466084040.

  • Finding palindromic polydivisible numbers e.g. the longest palindromic polydivisible number is 30000600003.

  • A common, trivial extension of the aforementioned example is to arrange the digits 0 to 9 to make a 10 digit number in the same way, the result is 3816547290. This is a pandigital polydivisible number that includes 0.

Friday, 23 July 2021

Pronic Pandigital Numbers and Beyond

My previous post on Pandigital Numbers Formed From Squares prompted me to investigate other ways of generating pandigital numbers. In July of 2018, I'd posted about Pandigital Numbers Formed From the Product of a Number and its Reversal. It occurred to me: why not consider pronic pandigital numbers. Pronic numbers are formed by multiplying two consecutive integers and are thus of the form \(n(n+1) \) where \(n\) is any integer.

Let's begin by considering what integers, when multiplied by the next consecutive integer, produce pandigital numbers with digits 1 to 9 occurring only once. It turns out that there are only 11 such numbers:

17846, 19403, 19727, 19871, 24768, 24776, 25568, 28521, 28556, 30878, 31203

Here is a permalink to a SageMath algorithm that will confirm this. This sequence of numbers does not appear in the OEIS and so it afforded me the opportunity to create a new sequence of my own.


S006:
Integers \(n\) such that the product of \(n\) and \(n+1\) produce pandigital

numbers in which the digits from 1 to 9 occur only once. These pandigital

numbers are pronic.


If zero is allowed, then there are 52 integers that, multiplied by the next consecutive integer, produce pandigital numbers in which the digits from 0 to 9 occur only once. These numbers are:

38627, 40508, 43065, 44027, 44576, 46565, 48735, 51714, 54269, 54459, 55151, 55152, 55331, 55403, 58454, 59579, 61497, 63072, 65465, 67580, 67662, 70154, 73737, 74906, 75662, 76203, 76337, 76760, 78011, 80631, 82809, 83015, 84555, 86076, 86553, 86688, 86769, 87669, 89064, 90198, 90423, 90909, 91943, 92169, 92268, 93356, 94464, 94617, 96362, 96570, 98702, 99270

Once again, this sequence of numbers does not occur in the OEIS and so I again seized the opportunity to create my own sequence:


S007: Integers \(n\) such that the product of \(n\) and \(n+1\) produce

pandigital numbers in which the digits from 0 to 9 occur only once.

These pandigital numbers are pronic.


What about numbers of the form \(n(n+1)(n+2)\)? These are sphenic numbers consisting of three consecutive integers. It turns out that there are no such numbers if the digits are to range from 1 to 9. However, there are two such numbers if the digits from 0 to 9 are considered. These two numbers are 1267 and 1332. We find that:$$1267 \times 1268 \times 1269 = 2038719564\\1332 \times 1333 \times 1334 =2368591704$$Going a step further and considering numbers of the form \(n(n+1)(n+2)(n+3)\), we find that only 291 satisfies in producing pandigital numbers with digits from 0 to 9:$$291 \times 292 \times 293 \times 294 =7319658024$$There are other variations on this theme. Consider numbers of the form \(n \times \text{ prime}(n) \). Here we find there are two numbers that produce pandigital numbers with digits from 1 to 9: 5499 and 7569$$5499 \times \text{ prime}(5499)=5499 \times 53987=296874513\\7569 \times \text{ prime}(7569)=7569 \times 77017 =582941673$$If the digits are to range from 0 to 9, then we find that there are ten possible numbers viz.$$11376, 14562, 15057, 15723, 16659, 20421, 21330, 24867, 28494, 28746$$The corresponding pandigital numbers are respectively:$$1375028496,2308615794,2476108593,2714308659,3064572981,\\4692357801,5147632890,7094281563,9435702618,9612058734$$The fact that there are more than a couple of suitable numbers here justifies another sequence:


S008: Integers \(n\) such that the product of \(n\) and prime(\(n\)) produce

pandigital numbers in which the digits from 0 to 9 occur only once.