Showing posts with label substring. Show all posts
Showing posts with label substring. Show all posts

Monday, 23 September 2024

More Numbers Within Numbers


In 
December of 2022, I made a post titled Numbers Within Numbers and so for this post I've made the title More Numbers Within Numbers but the types of numbers considered in the former post are quite different to the ones I'll be considering in this post. The idea for this post came from a peculiarity in the number associated with my diurnal age today: 27567.

What I mean by a number within a number in this present context is simply a substring of the number viewed as a string. Here the substring being considered is "27" that is contained within the larger string "27567". Thus we see that:$$ {\Large \textbf{27} 567}$$Now let's consider the sum of digits of the number:$${\Large \textbf{27} 567 \rightarrow  2 + 7 + 5 + 6+7= \textbf{27}}$$Let's move on to the factorisation where we have:$${\Large \textbf{27} 567= \textbf{27} \times 1021}$$Now what about the totient? We find that 27567 has a totient of 18360 and$$ {\Large 18360 = 5 \times 8 \times 17 \times \textbf{27}} $$Lastly, let's find the absolute value of the determinant of the circulant matrix of 27567. It turns out to be 6777 and$$  {\Large 6777  = \textbf{27} \times 251}  $$Thus in the case of 27567, the number within a number (27) turns up:

  • in the digits of the number
  • as the sum of the digits of the number
  • in the factors of the number
  • in the factors of the totient
  • in the factors of the determinant of the circulant matrix
It can be noted that 27567 is a Harshad number since it is a multiple of its sum of digits (27), and also a Moran number because the ratio is a prime number: 1021 = 27567 / (2 + 7 + 5 + 6 + 7).

The natural question to ask then is how many numbers in the range up to 40000 have this property? It turns out that there are only 18 such numbers with details as shown in Table 1.


Table 1: permalink

So what about other numbers? Let's start with a substring "1". There are five numbers satisfying the previous criteria in the range up to 40000. See Table 2.


Table 2: permalink

For substring "2", there are four numbers satisfying the criteria. See Table 3.


Table 3: permalink

For the substring "3", there are no numbers that meet the criteria. For the substring "4", there are appropriately four numbers that satisfy. See Table 4.


Table 4: permalink

For the substring "5", there are three numbers that meet the criteria. See Table 5.


Table 5: permalink

For substrings "6" and "7", no numbers qualify but for the substring "8" there are three numbers that do. See Table 6.


Table 6: permalink

There are no numbers that satisfy for "9" but there are 23 numbers that satisfy for "10". See Table 7.


Table 7: permalink

For "11", no numbers that satisfy but for "12" there are 39 numbers that satisfy. See Table 8.


Table 8: permalink

For "13", there are two numbers that satisfy. See Table 9.


Table 9: permalink

For "14", there are three numbers that satisfy. See Table 10.


Table 10: permalink

For "15", there are 26 numbers that satisfy. See Table 11.


Table 11: permalink

For "16", there are 14 numbers that satisfy. See Table 12.


Table 12: permalink

For "17", there is only one number. See Table 13.


Table 13: permalink

For "18", there is a grand total of 69 numbers that qualify. See Table 14.


Table 14: permalink

For "19", there are no numbers that qualify but for "20" there are four. See Table 15.


Table 15: permalink

For "21", there are three numbers that qualify. See Table 16.


Table 16: permalink

For "22", there are two numbers that satisfy. See Table 17.


Table 17: permalink

For "23", there is only one number that satisfies. See Table 18.


Table 18: permalink

For "24", there are nine numbers that satisfy. See Table 19.


Table 19: permalink

For "25", there are four numbers that satisfy. See Table 20.


Table 20: permalink

For "26", there are no numbers that qualify and we've already dealt with "27". For "28", there is only one number that satisfies. See Table 21.


Table 21: permalink

That's it for particles in the range up to 40,000 as the SOD criterion makes it difficult  for the digit sum to reach these higher particles. Just to illustrate with an example. Take the particle "29". If we extend the range to one million, then instead of the zero for the range up to 40,000, we have nine numbers that satisfy the criteria. See Table 21.


Table 21: permalink

So, an interesting exercise but purely confined to the realm of recreational Mathematics. There no real reason to conflate the digit sum of a number with its factors as well as its totient and the determinant of its circulant matrix. 

Friday, 15 March 2024

Of Substrings and Divisors

Today I turned 27375 days old and this number has an interesting property in that:$$ \begin{align} 27375 &=375 \times 73  \\ &=5 \times 73 \times 75 \end{align}$$Looking at the numbers on the RHS of the equations, it can be seen that 5, 73, 75 and 375 are all substrings of the string 27375, considering the numbers as collections of characters rather than digits. The numbers with this property form OEIS A059470:


 A059470

Numbers that are the products of distinct substrings (>1) of themselves and do not end in 0.



These numbers are not numerous and up to 40000 they are:

125, 375, 735, 1197, 1296, 1352, 1593, 1734, 2346, 3125, 4224, 4872, 5775, 8448, 9072, 11715, 12768, 13455, 14476, 14673, 15625, 16128, 17136, 17493, 18432, 21168, 22176, 23184, 23391, 27216, 27375, 27648, 27864, 32256, 34272, 34398, 36288, 36864, 37296, 39375

The breakdown into divisors/substrings is as follows with some numbers having more than one representation (permalink):

125 equals the product of [25, 5]
375 equals the product of [75, 5]
735 equals the product of [35, 3, 7]
1197 equals the product of [9, 19, 7]
1296 equals the product of [9, 2, 12, 6]
1352 equals the product of [2, 52, 13]
1593 equals the product of [9, 3, 59]
1734 equals the product of [17, 34, 3]
2346 equals the product of [3, 34, 23]
3125 equals the product of [25, 125]
4224 equals the product of [24, 2, 4, 22]
4872 equals the product of [87, 7, 8]
4872 equals the product of [2, 4, 87, 7]
5775 equals the product of [75, 77]
8448 equals the product of [48, 4, 44]
9072 equals the product of [72, 9, 2, 7]
11715 equals the product of [11, 15, 71]
12768 equals the product of [2, 7, 12, 76]
13455 equals the product of [13, 3, 345]
14476 equals the product of [7, 44, 47]
14673 equals the product of [3, 73, 67]
15625 equals the product of [625, 25]
16128 equals the product of [6, 8, 12, 28]
17136 equals the product of [3, 6, 7, 136]
17493 equals the product of [17, 3, 49, 7]
18432 equals the product of [32, 4, 18, 8]
21168 equals the product of [21, 6, 168]
22176 equals the product of [176, 21, 6]
23184 equals the product of [3, 4, 84, 23]
23391 equals the product of [339, 3, 23]
27216 equals the product of [6, 21, 216]
27216 equals the product of [2, 7, 72, 27]
27375 equals the product of [375, 73]
27375 equals the product of [5, 73, 75]
27648 equals the product of [64, 2, 8, 27]
27864 equals the product of [2, 6, 86, 27]
32256 equals the product of [32, 3, 6, 56]
34272 equals the product of [3, 42, 272]
34272 equals the product of [2, 34, 7, 72]
34272 equals the product of [2, 34, 3, 4, 42]
34398 equals the product of [9, 98, 39]
36288 equals the product of [2, 3, 36, 6, 28]
36864 equals the product of [64, 3, 4, 6, 8]
37296 equals the product of [2, 37, 7, 72]
37296 equals the product of [2, 7, 296, 9]
37296 equals the product of [3, 6, 7, 296]
39375 equals the product of [3, 5, 7, 375]

I adapted the code for generating the substrings from this source (see Figure 1).


While these numbers are not frequent, there are two coming up in the relatively near future (27648 and 27864) before there is a big gap to the next number, 32256.

Saturday, 25 March 2023

Super-d Numbers Revisited

For some reasons, a search for super-\(d\) numbers failed to initially discover a previous post on the topic from February 22nd, 2022. Consequently, some of the content in that post has been repeated. Here is the earlier post titled Super-d Numbers. It's a good idea to view both posts as each contains certain content that isn't repeated in the other. The number of posts in this blog now exceeds 500 so it's easy to forget about previous posts. I need to be thorough in the tags that I add to each post.

Here is the new post created when I wasn't aware of the earlier post. 

For \(d=2, \dots,9\), a super-\(d\) number is a number \(n\) such that \(d \cdot n^d\) contains a substring made of \(d\) digits \(d\). For example, 261 is a super-3 number since \(3\cdot261^3=5\underline{333}8743\).

I was reminded of these numbers because my diurnal age today, 27019, is a super-2 number since \(2 \cdot 27019^2=14600527\underline{22}\). Figure 1 shows a table of the initial \(d\)-numbers for values of \(d\) from 2 to 9.


Figure 1:  source


Figure 2 shows the initial palindromic super-\(d\) numbers for values of \(d\) from 2 to 6.


Figure 2: source

The frequency of super-\(d\) numbers decreases as the value of \(d\) increases. The numbers in the range up to 40,000 are 4377, 420, 43, 12, 1, 0, 0, 0 for \(d\) = 2, 3, 4, 5, 6, 7, 8, 9 respectively. For me, a forthcoming super-6 number, and the only one is the range up to 40,000, is 27257 with the property that:$$6 \cdot 27257 \, ^6=2460478505381 \underline{666666} 506497894 $$Here is a Permalink to the calculation.