Showing posts with label refactorable. Show all posts
Showing posts with label refactorable. Show all posts

Thursday, 29 February 2024

Strongly Refactorable Numbers

On November 21st 2022, I posted about Tau Numbers and wrote:

A refactorable number or tau number is an integer \(n\) that is divisible by the count of its divisors, or to put it algebraically, \(n\) is such that \( \tau(n) | n \). The first few refactorable numbers are listed in OEIS A033950 as:

1, 2, 8, 9, 12, 18, 24, 36, 40, 56, 60, 72, 80, 84, 88, 96, 104, 108, 128, 132, 136, 152, 156, 180, 184, 204, 225, 228, 232, 240, 248, 252, 276, 288, 296, ...

For example, 18 has 6 divisors (1 and 18, 2 and 9, 3 and 6) and is divisible by 6. There are infinitely many refactorable numbers. Source.

So a refactorable number is the same as a tau number and these are relatively common. Up to 100,000, there are 5257 such numbers representing 5.257% of the range. However, they have a natural density of zero. So what is a strongly refactorable number?

I discovered what characterised these numbers thanks to a property of the number associated with my diurnal age today, 27360, that also corresponds to the 29th of February 2024. It happens to be a member of OEIS A141586:


 A141586

Strongly refactorable numbers: numbers \(n\) such that if \(n\) is divisible by \(d\), it is divisible by the number of divisors of \(d\).



Such numbers are few and far between. The number previous to 27360 was 25440. The 41 members of the sequence up to 40,000 are (permalink):

1, 2, 12, 24, 36, 72, 240, 480, 720, 1440, 3360, 4320, 5280, 6240, 6720, 8160, 9120, 10080, 11040, 13440, 13920, 14880, 15840, 17760, 18720, 19680, 20160, 20640, 21600, 22560, 24480, 25440, 27360, 28320, 29280, 32160, 33120, 34080, 35040, 37920, 39840

27360 factorises to \(2^5 \times 3^2 \times 5 \times 19 \) and thus it has 72 divisors. These are:

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 19, 20, 24, 30, 32, 36, 38, 40, 45, 48, 57, 60, 72, 76, 80, 90, 95, 96, 114, 120, 144, 152, 160, 171, 180, 190, 228, 240, 285, 288, 304, 342, 360, 380, 456, 480, 570, 608, 684, 720, 760, 855, 912, 1140, 1368, 1440, 1520, 1710, 1824, 2280, 2736, 3040, 3420, 4560, 5472, 6840, 9120, 13680, 27360

The number of divisors of these divisors is listed below and all these numbers divide 27360 as well:

1, 2, 2, 3, 2, 4, 4, 3, 4, 6, 4, 5, 6, 2, 6, 8, 8, 6, 9, 4, 8, 6, 10, 4, 12, 12, 6, 10, 12, 4, 12, 8, 16, 15, 8, 12, 6, 18, 8, 12, 20, 8, 18, 10, 12, 24, 12, 16, 24, 16, 12, 18, 30, 16, 12, 20, 24, 24, 36, 20, 24, 24, 32, 30, 24, 36, 40, 36, 48, 48, 60, 72

It will be 960 days before I see the next strongly refactorable number (28320). That will occur on October 16th, 2026.

Monday, 21 November 2022

Tau Numbers

Having just posted about anti-tau numbers, I realised that I hadn't yet made a dedicated post about tau numbers and in fact only mentioned them briefly in a post titled Arithmetic Numbers. In this post, I'll address that deficiency. 

Wikipedia has the following definition:

A refactorable number or tau number is an integer \(n\) that is divisible by the count of its divisors, or to put it algebraically, \(n\) is such that \( \tau (n) \mid n \). The first few refactorable numbers are listed in OEIS A033950 as:

1, 2, 8, 9, 12, 18, 24, 36, 40, 56, 60, 72, 80, 84, 88, 96, 104, 108, 128, 132, 136, 152, 156, 180, 184, 204, 225, 228, 232, 240, 248, 252, 276, 288, 296, ...

For example, 18 has 6 divisors (1 and 18, 2 and 9, 3 and 6) and is divisible by 6. There are infinitely many refactorable numbers.

Up to 100,000, there are 5257 tau numbers representing 5.257% of the range. However, the article points out that these numbers have a natural density of zero. Another Wikipedia article explains what is meant by this term:

In number theory, natural density (also referred to as asymptotic density or arithmetic density) is one method to measure how "large" a subset of the set of natural numbers is. It relies chiefly on the probability of encountering members of the desired subset when combing through the interval [1, \(n\)] as \(n\) grows large.

Intuitively, it is thought that there are more positive integers than perfect squares, since every perfect square is already positive, and many other positive integers exist besides. However, the set of positive integers is not in fact larger than the set of perfect squares: both sets are infinite and countable and can therefore be put in one-to-one correspondence. Nevertheless if one goes through the natural numbers, the squares become increasingly scarce. The notion of natural density makes this intuition precise for many, but not all, subsets of the naturals (see Schnirelmann density, which is similar to natural density but defined for all subsets of \( \mathbb{N} \).

If an integer is randomly selected from the interval [1, \(n\)], then the probability that it belongs to A is the ratio of the number of elements of A in [1, \(n\)] to the total number of elements in [1,\( n\)]. If this probability tends to some limit as \(n\) tends to infinity, then this limit is referred to as the asymptotic density of A. This notion can be understood as a kind of probability of choosing a number from the set A. Indeed, the asymptotic density (as well as some other types of densities) is studied in probabilistic number theory.

It has been proven that there are no three consecutive integers that are all tau numbers. They can appear in pairs however, although not often. For example, up to 100,000, there are only 13 such pairs. These are:

(1, 2), (8, 9), (1520, 1521), (50624, 50625), (62000, 62001), (103040, 103041), (199808, 199809), (221840, 221841), (269360, 269361), (463760, 463761), (690560, 690561), (848240, 848241), (986048, 986049)

Take the last pair as an example:

\(986048 = 2^6 \times 7 \times 31 \times 71\) with \(56\) divisors such that \( 56 \mid 986048= 17608\)

\(986049 = 3^2 \times 331^2\) with \(9\) divisors such that \(9 \mid 986049= 109561\)

Whether there are an infinite number of such pairs is not known. Numbers Aplenty states that the smallest Pythagorean triple of tau numbers is (40, 96,104) which is not a primitive triple because it is a multiple of (5, 12, 13).  No one knows if there is a primitive triple.

Up to one million, there are 60 palindromic tau numbers. They are:

[1, 2, 8, 9, 88, 232, 252, 424, 444, 636, 808, 828, 2772, 4224, 12321, 21512, 21612, 23032, 23832, 24642, 25352, 25452, 27372, 29292, 40104, 40904, 42324, 42424, 42624, 44244, 46164, 46264, 46464, 48084, 48384, 48584, 48684, 61416, 61816, 63036, 63636, 65856, 67476, 67576, 69396, 69896, 80508, 82428, 84248, 84948, 86168, 86868, 88188, 88488, 216612, 270072, 423324, 426624, 468864, 486684]

Again, up to one million, there are also 2731 non-palindromic tau numbers whose reversals are also tau numbers. The first such number is 80 with reversal 8. The initial members of this sequence are:

80, 276, 288, 468, 480, 672, 864, 880, 882, 1440, 1656, 2000, 2025, 2148, 2160, 2176, 2178, 2196, 2320, 2388, 2700, 2988, 4044, 4050, 4068, 4080, 4240, 4284, 4404, 4668, 4824, 4856, 4860, 4896, 5202, 5220, 6561, 6584, 6712, 6720, 6912, 6984, 8080, 8100, 8412, 8604, 8649, 8664, 8712, 8832, 8892, 9468, 10000, ... permalink

It should be noted that \( \tau(n)=\sigma(n,0)\) and so this function can be used as an alternative to len(divisors(\(n\))) in any calculations.

There's an interesting history associated with the term refactorable number. To quote again from the Wikipedia article:

First defined by Curtis Cooper and Robert E. Kennedy where they showed that the tau numbers have natural density zero, they were later rediscovered by Simon Colton using a computer program he had made which invents and judges definitions from a variety of areas of mathematics such as number theory and graph theory. Colton called such numbers "refactorable". While computer programs had discovered proofs before, this discovery was one of the first times that a computer program had discovered a new or previously obscure idea. Colton proved many results about refactorable numbers, showing that there were infinitely many and proving a variety of congruence restrictions on their distribution. Colton was only later alerted that Kennedy and Cooper had previously investigated the topic.

Note that \(\tau\) is sometimes used to refer to \(2 \times \pi\) but that usage has nothing to do with this post. 

Anti-tau Numbers

I was familiar with what a tau number was, the definition being that it is an integer divisible by its number of its divisors.  Tau is the divisor function and returns the number of divisors of an integer e.g. \( \tau(6)=4\) because 6 has four divisors (1, 2, 3 and 6). However, 6 is not a tau number because 4 does not divide 6 without remainder.

In general, we can say that a number \(n\) is a tau number if \( \tau(n)|n\). 12 is a tau number because \( \tau(12) =6\) and \(6|12=2\). An alternative term, refactorable number, can be used for tau numbers (see Wikipedia entry). What then is an anti-tau number? Well, it turns out to be a number \(n\) such that \( \text{gcd}(n,\tau(n))=1\). These numbers comprise OEIS A046642.


 A046642

Numbers \(k\) such that \(k\) and number of divisors \( \text{d}(k)\) are relatively prime. 
                   

Note that \( \text{d}(k)\) is sometimes used in place of \( \tau(k) \). All odd prime numbers will be anti-tau numbers because they have two divisors and 2 does not divide them. An example of an anti-tau number is 15 because it has four divisors (1, 3, 5 and 15) and gcd(15, 4) = 1. These numbers are quite frequent. There are 18080 in the range up to 40,000, representing over 45% of all the numbers in the range. The initial members are:

1, 3, 4, 5, 7, 11, 13, 15, 16, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 47, 49, 51, 53, 55, 57, 59, 61, 64, 65, 67, 69, 71, 73, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 100, 101, 103, 105, 107, 109, 111, 113, 115, 119, 121, 123, 125, 127, 129, 131

Notice that all even anti-tau numbers are square numbers (4, 16, 64, 100, 196, 256, 484, 676, 784, 1024 etc.) of the form \(4k^2\) where \(k\) is a positive even integer. However, not all even values of \(k\) produce anti-tau numbers. The initial values of \(k\) are 2, 4, 8, 10, 14, 16,  22, ...

By contrast, tau numbers are less common. In the range up to 100,000, there are 5257 of them representing 5.257% of the range. The anti-tau numbers were brought to my attention by one of the properties of the number representing my diurnal age, 26895, qualifying it for membership of OEIS A341780:


 A341780

Starts of runs of 3 consecutive anti-tau numbers (A046642).     
                  


Let's look at 26895, 26896 and 26897 to confirm that this is true:
  • \(26895 = 3 \times 5 \times 11 \times 163\) with 16 divisors and 16 is relatively prime to it
  • \(26896 = 2^4 \times 41^2\) with 15 divisors and 15 is relatively prime to it
  • \(26897 = 13 \times 2069\) with 4 divisors and 4 is relatively prime to it
Despite how common anti-tau numbers are, these runs of three (the maximum possible) are not that frequent. The problem is that the runs are of the form odd-even-odd and the even numbers must be of the form \(4k^2\) as mentioned earlier. It is these relatively sparse even anti-tau numbers that make these runs less common than might be expected. Notice how \(26896 = 4 \times 82^2\). There are only 69 such numbers in the range up to 100,000. Here is the list:

3, 15, 195, 255, 483, 783, 1023, 1155, 1295, 1443, 1599, 2703, 3363, 4623, 4899, 5183, 6399, 6723, 7395, 7743, 8463, 8835, 10815, 11235, 11663, 12099, 12543, 15375, 16383, 16899, 17955, 18495, 20163, 24963, 25599, 26895, 27555, 31683, 33855, 35343, 36099, 37635, 38415, 40803, 44943, 45795, 46655, 47523, 52899, 53823, 55695, 56643, 61503, 62499, 64515, 65535, 70755, 71823, 73983, 80655, 81795, 82943, 85263, 87615, 88803, 91203, 92415, 94863, 96099

Here is a permalink that will confirm all the above results.