Showing posts with label triplet. Show all posts
Showing posts with label triplet. Show all posts

Friday, 8 August 2025

Consecutive Numbers and Consecutive Primes

Let's take triplets of primes, starting with 2, 3 and 5, and find three consecutive numbers (let's call them \(k, k+1\) and \(k+3\)) that are divisible by these primes respectively. In other words, we need \(k\) to be a multiple of 2, \(k+1\) to be a multiple of 3 and \(k+2\) to be a multiple of 5. A little trial error shows that the value of \(k\) that satisfies is 8 because 2 divides 8, 3 divides 9 and 5 divides 10. This triplet of numbers (8, 9 and 10) is the smallest that is divisible by 2, 3 and 5 respectively. As the primes get larger however, we need an algorithm to find the values of \(k, k+1\) and \(k+2\) that are divisible by consecutive primes \(p, q\) and \(r\). Here is the permalink to an algorithm that will do just that. The results are shown below.

  prime 1   prime 2   prime 3   number 1   number 2   number 3

  2         3         5         8          9          10
  3         5         7         54         55         56
  5         7         11        20         21         22
  7         11        13        791        792        793
  11        13        17        1936       1937       1938
  13        17        19        169        170        171
  17        19        23        4046       4047       4048
  19        23        29        114        115        116
  23        29        31        9453       9454       9455
  29        31        37        31929      31930      31931
  31        37        41        23901      23902      23903
  37        41        43        2664       2665       2666
  41        43        47        44977      44978      44979
  43        47        53        65188      65189      65190
  47        53        59        122482     122483     122484
  53        59        61        134991     134992     134993
  59        61        67        170982     170983     170984
  61        67        71        220027     220028     220029
  67        71        73        101103     101104     101105
  71        73        79        85555      85556      85557
  73        79        83        27886      27887      27888
  79        83        89        296724     296725     296726
  83        89        97        629140     629141     629142
  89        97        101       154326     154327     154328
  97        101       103       546207     546208     546209
  101       103       107       46864      46865      46866
  103       107       109       950587     950588     950589
  107       109       113       1043892    1043893    1043894
  109       113       127       1548890    1548891    1548892
  113       127       131       70738      70739      70740
  127       131       137       702945     702946     702947
  131       137       139       2389964    2389965    2389966
  137       139       149       1513987    1513988    1513989
  139       149       151       416305     416306     416307
  149       151       157       3386174    3386175    3386176
  151       157       163       3220226    3220227    3220228
  157       163       167       1531221    1531222    1531223
  163       167       173       2865051    2865052    2865053
  167       173       179       4309602    4309603    4309604
  173       179       181       3968966    3968967    3968968
  179       181       191       826264     826265     826266
  181       191       193       3557374    3557375    3557376
  191       193       197       2119718    2119719    2119720
  193       197       199       4096811    4096812    4096813
  197       199       211       1823038    1823039    1823040
  199       211       223       8583268    8583269    8583270
  211       223       227       7453997    7453998    7453999
  223       227       229       9175112    9175113    9175114
  227       229       233       9590977    9590978    9590979
  229       233       239       3294852    3294853    3294854

The number associated with my diurnal age today, 27886, appears in the above list and is associated with the primes 73, 79 and 83. Thus we have:$$ \begin{align} 27886 &= 2 \times \textbf{73} \times 191 \\ 27887 &= \textbf{79} \times 353 \\ 27888 &= 2^4 \times 3 \times 7 \times \textbf{83} \end{align} $$Figure 1 shows a plot of the prime 1 against number 1 with some annotations added. Though the trend of number 1's is upward, there is a lot of up and down along the way. The vertical axis of the graph is logarithmic.


Figure 1

Thursday, 29 May 2025

Xenodrome Pairs, Triplets Etc.

\( \textbf{27815} \), the number associated with my diurnal age today, is one of those numbers for which an interesting property is hard to come by. However, I did notice that the number was a xenodrome in both base 10 and base 9 (42135). A little further investigation revealed that 27816 also shared this property. That got me thinking about how often pairs of such numbers occur. Now I've written about xendromes before in posts titled Xenodromes and Xenodrome Probabilities in which I've looked at numbers that remain xenodromes in various bases but so far I've not looked at groupings of numbers by pairs, triplets, quadruplets etc. with properties relating to xenodromes.

In my Bespoken for Sequences database, I've listed the following sequence of numbers:$$ \begin{align} \textbf{Smaller of a pair of consecutive numbers} \\ \textbf{that are xenodromes in base 10 and base 9} \end{align} $$Between 27815 and 40000, there are 282 numbers with this property (permalink):

27815, 27834, 27835, 27845, 27860, 27950, 27953, 27960, 28013, 28016, 28134, 28169, 28195, 28196, 28314, 28346, 28356, 28364, 28395, 28456, 28495, 28509, 28536, 28563, 28573, 28590, 28609, 28670, 28914, 28934, 28935, 28963, 29015, 29016, 29053, 29075, 29084, 29085, 29103, 29134, 29147, 30147, 30148, 30156, 30157, 30186, 30194, 30195, 30196, 30457, 30458, 30467, 30528, 30548, 30561, 30591, 30691, 30724, 30725, 30751, 30764, 30814, 30825, 30851, 30924, 30925, 31024, 31025, 31048, 31057, 31086, 31094, 31095, 31096, 31097, 31257, 31258, 31259, 31267, 31268, 31284, 31294, 31475, 31586, 31604, 31607, 31608, 31806, 31824, 31825, 31826, 31859, 31905, 31906, 31907, 32018, 32104, 32108, 32159, 32189, 32496, 32508, 32509, 32546, 32580, 32589, 32590, 32607, 32608, 32609, 32648, 32657, 32670, 32689, 32690, 32697, 32907, 32947, 32960, 32964, 34027, 34058, 34085, 34086, 34091, 34095, 34127, 34157, 34158, 34175, 34185, 34206, 34215, 34275, 34278, 34279, 34296, 34297, 34560, 34567, 34568, 34569, 34578, 34620, 34650, 34658, 34761, 34785, 34815, 34820, 34905, 34917, 34926, 35016, 35017, 35047, 35097, 35169, 35196, 35197, 35208, 35216, 35217, 35479, 35486, 35496, 35641, 35809, 35826, 35890, 35891, 35916, 35917, 35946, 35961, 35970, 35971, 35980, 35981, 36018, 36027, 36028, 36208, 36209, 36214, 36218, 36270, 36278, 36279, 36280, 36289, 36290, 37195, 37204, 37245, 37285, 37294, 37295, 37458, 37459, 37485, 37495, 37519, 37520, 37528, 37568, 37819, 37820, 37845, 37864, 37890, 37891, 37920, 37945, 37964, 37981, 38015, 38024, 38045, 38046, 38064, 38105, 38106, 38124, 38145, 38159, 38169, 38205, 38206, 38240, 38249, 38250, 38259, 38260, 38405, 38406, 38415, 38420, 38469, 38649, 38670, 38674, 38694, 38701, 38720, 38724, 38751, 38760, 38904, 38916, 39015, 39016, 39017, 39024, 39025, 39026, 39124, 39125, 39126, 39186, 39205, 39206, 39207, 39215, 39216, 39240, 39260, 39481, 39485, 39540, 39541, 39571, 39580, 39604, 39701, 39715, 39724, 39764, 39805, 39814, 39845, 39846

There are 69  triplets in the same range (permalink):$$ \begin{align} \textbf{Smallest of a triplet of consecutive numbers} \\ \textbf{that are xenodromes in base 10 and base 9} \end{align} $$27834, 28195, 28934, 29015, 29084, 30147, 30156, 30194, 30195, 30457, 30724, 30924, 31024, 31094, 31095, 31096, 31257, 31258, 31267, 31607, 31824, 31825, 31905, 31906, 32508, 32589, 32607, 32608, 32689, 34085, 34157, 34278, 34296, 34567, 34568, 35016, 35196, 35216, 35890, 35916, 35970, 35980, 36027, 36208, 36278, 36279, 36289, 37294, 37458, 37519, 37819, 37890, 38045, 38105, 38205, 38249, 38259, 38405, 39015, 39016, 39024, 39025, 39124, 39125, 39205, 39206, 39215, 39540, 39845

An example is the xenodrome 27834 with 27835 and 27836 also xenodromes. The base 9 equivalents 42156, 42157 and 42158 are also xenodromes.

There are 13 quadruplets in the same range (permalink):$$ \begin{align} \textbf{Smallest of a quaduplet of consecutive numbers} \\ \textbf{that are xenodromes in base 10 and base 9} \end{align} $$30194, 31094, 31095, 31257, 31824, 31905, 32607, 34567, 36278, 39015, 39024, 39124, 39205

An example is the xenodrome 30194 with 30195, 30196 and 30197 also xenodromes. The base 9 equivalents 45368, 45370, 45371 and 45372 are also xenodromes. 

There is only one \( \textbf{quintuplet}\) in the range and that is 31094. Here we see that 31094, 31095, 31096, 31097 and 31098 are all xenodromes as are their base 9 equivalents 46578, 46580, 46581, 46582 and 46583.

Friday, 30 August 2024

Dancing Digits

Whenever I'm confronted with a number associated with my diurnal age that seems to have no interesting properties, I inevitably find something very special and interesting about that number. Yesterday's number, 27542, was a number of this sort and it took me a day to stumble upon what's interesting about it.

My starting point was that it's a sphenic number because:$$2542=2 \times 47 \times 293$$Such numbers can be viewed as sphenic bricks with the three prime factors corresponding to the length, width and height. The surface area of such a brick means that there is always a second number that is inextricably linked to the original sphenic number and I've written about this in earlier posts. In the case of 27542, this second number and the surface area of the brick is 28902. This second number however, is also sphenic since we have:$$28902=2 \times 3 \times 4817$$This means that we can find the surface area of this second brick. It is 48182 which is not sphenic. However, we now have a triplet of numbers formed:$$27542, 28902, 48182$$If we find the product of these three numbers, it turns out to be an interesting number:$$27542 \times 28902 \times 48182 = 38353781868888$$It's interesting because it's 14 digits long and the digit 8 comprises precisely half of them.

The question then is how common is it for such triplets of numbers, when multiplied, to generate a number in which a single digit comprises at least 50% of all the digits? Let's reflect on the criteria for such numbers:

  • the number must be sphenic and constitutes the first sphenic brick: p
  • the surface area of this brick must also be a sphenic number: q
  • this second number constitutes the second sphenic brick
  • the surface area of this second brick constitutes the third number: r
  • the product of p, q and r must contain a digit that comprises at least 50% of the digits of the number.
In the case of the digit 8, there are only three other numbers that qualify in the range up to 100,000 and these can be viewed in Figure 1. The first number in the list is 27542.


Figure 1: plethora of the digit 8

So it turns out that 27542 is the first member of a rather special sequence indeed. What about other digits? Let's start with 0.  Figure 2 shows the results for the digit 0, again up to 100,000.


Figure 2: plethora of the digit 0

The results for the digit 1 are shown in Figure 3.


Figure 3: plethora of the digit 1

For digits 2 and 3 there are no numbers and the results for digit 4 are shown in Figure 4.


Figure 4: plethora of the digit 4

For digit 6, 7 and 9 only one result is found in each case. See Figures 5, 6, 7 and 8.


Figure 5: plethora of the digit 5


Figure 6: plethora of the digit 6



Figure 7: plethora of the digit 7



Figure 8: plethora of the digit 9

Here is a permalink to the algorithm used to generate these numbers. Overall then, the numbers which produce a single digit that accounts for at least 50% of the final product of digits are:

1833, 1887, 7189, 14833, 15589, 16242, 16405, 27542, 36449, 38006, 38319, 43589, 87731

A very exclusive club indeed. Of course these number properties are base-dependent and so  fall into the realm of recreational mathematics but numberphiles are indifferent to such divisions and simply delight in the dance of the digits.

Thursday, 2 May 2024

Divisibility Sequences

It's easy to miss. The square numbers are 1, 4, 9, 16, 25, 36, 49 and so on but it's not obvious that the consecutive integers 27423, 27424 and 27425 are divisible by consecutive square numbers. Thus we have:$$ \begin{align} 27423 &= 3^2 \cdot 11 \cdot 277 \text{ divisible by }9=3^2\\27424 &= 2^5 \cdot 857 \text{ divisible by }16=4^2\\27425 &= 5^2 \cdot 1097 \text{ divisible by }25=5^2 \end{align}$$I only noticed this fact because my diurnal age today is 27423 and this number is a member of OEIS A178919:


 A178919

Smallest of three consecutive integers divisible respectively by three consecutive squares greater than 1.



Membership of this sequence does not come easy and can be seen in the list of its initial members (permalink):

2223, 5823, 9423, 13023, 16623, 20223, 23823, 27423, 31023, 32975, 34623, 38223, 41823, 45423, 49023, 52623, 56223, 59823, 63423, 67023, 70623, 74223, 77075, 77823, 81423, 85023, 88623, 92223, 95823, 99423, 103023, 106623, 110223

Not surprisingly membership in the equivalent sequence of two consecutive integers divisible by two consecutive squares is a lot easier. This sequence is OEIS A178918. The natural question to ask is whether there are groups of four consecutive integers divisible by four consecutive squares. Testing up in the range up to ten million, we find no such groups. However, they may well exist further out.

What about cubes? Can we find groups of three consecutive integers that are divisible by three consecutive cubes greater than 1. Indeed we can and, up one million, the sequence of the smallest members of these trios is (permalink):

106623, 322623, 538623, 754623, 970623 (not listed in the OEIS)

Let's look at the first member of the sequence where we find:$$\begin{align} 106623 &= 3^3 \cdot 11 \cdot 359 \text{ divisible by } 27 =3^3\\106624 &= 2^7 \cdot 7^2 \cdot 17 \text{ divisible by }64 =4^3\\106625 &= 5^3 \cdot 853 \text{ divisible by }125 =5^3 \end{align}$$What's interesting about sequences like this is that the numbers derive their membership via the groups to which they belong. For convenience, as in the case of OEIS A178919, only the first number in the group is listed. It is the relationship between the numbers in the group that are important. In the case of OEIS A178919 the numbers form a group of three that are consecutive and divisible by consecutive squares. Thus we have in the case of 27423:$$ \text{consecutive integers -->}\\ \frac{27423}{9} \, \frac{27424}{16} \, \frac{27425}{25} \\ \text{consecutive squares -->} $$or in the case of 106623:$$ \text{consecutive integers -->}\\ \frac{106623}{27} \, \frac{106624}{64} \, \frac{106625}{125} \\ \text{consecutive cubes -->} $$It would be interesting to explore divisibility using criteria other than divisibility by consecutive squares or cubes. What about divisibility of three consecutive integers by three consecutive fibonacci numbers (0, 1, 1, 2, 3, 5, 8, ...)? Well, if we ignore 0 and 1 and start with 2, it turns out that a great many groups of three qualify, most of which are divisible by 2, 3 and 5. The first of these begins with 8:$$ \begin{align} 8 &= 2^3 \text{ divisible by fibonacci number }2\\9 &= 3^2 \text{ divisible by fibonacci number } 3\\10 &= 2 \cdot 5 \text{ divisible by fibonacci number } 5 \end{align}$$There are 4417 such groups of three in the range up to 100,000, so they are very common. If we exclude 2, 3 and 5 and begin instead with 8, then the groupings of three become far less common (only 60 in the range up 100,000). The first of these begins with 376 (permalink):$$ \begin{align} 376 &= 2^3 \cdot 47 \text{ divisible by fibonacci number } 8\\377 &= 13 \cdot 29 \text{ divisible by fibonacci number }13\\378 &= 2 \cdot 3^3 \cdot 7 \text{ divisible by fibonacci number } 21 \end{align}$$This is clearly a topic worthy of further research.

Wednesday, 19 October 2022

What's Special About 26862?

As my diurnal age today is 26862, I thought it worthy of some detailed analysis. Recently I've started to give such palindromic days posts of their own. For example:

I've also made several posts about palindromes in general:
So let's get started on 26862. To begin with it's what I call a five digit “balanced” number. By this I mean a number such that the sum of the first two digits equals the middle digit and the sum of the last two digits equals the middle digit. There are 330 numbers with this property but only 45 of them are palindromes (permalink). The palindromes are:

10101, 11211, 12321, 13431, 14541, 15651, 16761, 17871, 18981, 20202, 21312, 22422, 23532, 24642, 25752, 26862, 27972, 30303, 31413, 32523, 33633, 34743, 35853, 36963, 40404, 41514, 42624, 43734, 44844, 45954, 50505, 51615, 52725, 53835, 54945, 60606, 61716, 62826, 63936, 70707, 71817, 72927, 80808, 81918, 90909
Thus in the case of 26862 we have:$$ \underbrace{2 \, 6}_{2+6=8} \, 8 \, \underbrace{6 \, 2}_{6+2=8}$$The palindromes in particular that have 8 as the central digit are:
  • 17871
  • 26862
  • 35853
  • 44844
  • 53853
  • 62862
  • 71871
  • 80808
All eight palindromes and thus linked to the famous 888.

About 90% of numbers can be expressed as sum of two palindromes and 26862 is such a number. It can be represented as a sum of two distinct palindromes in 31 different ways (permalink). If the two palindromes don't need to be unique then we can add 13431+13431 for a total of 32. The palidromes are:
[10001+16861], [10101+16761], [10201+16661], [10301+16561], [10401+16461], [10501+16361], [10601+16261], [10701+16161], [10801+16061], [11011+15851], [11111+15751], [11211+15651], [11311+15551], [11411+15451], [11511+15351], [11611+15251], [11711+15151], [11811+15051], [12021+14841], [12121+14741], [12221+14641], [12321+14541], [12421+14441], [12521+14341], [12621+14241], [12721+14141], [12821+14041], [13031+13831], [13131+13731], [13231+13631], [13331+13531], [13431+13431]

However, of these 31, there are only four pairs in which both numbers are prime (permalink). These are:

[10301+16561], [10501+16361], [11311+15551], [11411+15451]

This property of the number qualifies it for membership in OEIS A356854:


A356854



Palindromes that can be written in more than one way as the sum of two distinct palindromic primes.

Here are is the list of sequence members up to 40,000:

282, 484, 858, 888, 21912, 22722, 23832, 24642, 25752, 26662, 26762, 26862, 26962, 27672, 27772, 27872, 27972, 28482, 28782, 28882, 28982, 29692, 29792, 29892, 29992

All numbers can be represented as a sum of three palindromes and there are 190 ways to do so with 26862. I won't list them all here but one example is 161 + 949 + 25752.

The number 26862 is not only symmetric internally but also externally in a number of ways. To begin with it is sandwiched between two primes and is thus the average of the two:$$\underbrace{26861}_{\text{prime}} \, 26862 \, \underbrace{26863}_{\text{prime}}$$Furthermore, it is also a practical number that is the average of the previous practical number (two below it) and the next practical number (two above it). Practical numbers are always even. Thus we have:$$\underbrace{26860}_{\text{practical}} \, \underbrace{26862}_{\text{practical}} \, \underbrace{26864}_{\text{practical}} $$These prime number and practical number properties qualify 26862 for membership in OEIS A209236:


A209236

List of integers m>0 with m-1 and m+1 both prime, and m-2, m, m+2 all practical.

Such numbers are few and far between. Here is the list of sequence members up to 100,000:

4, 6, 18, 30, 198, 462, 1482, 2550, 3330, 4422, 9042, 11778, 26862, 38610, 47058, 60258, 62130, 65538, 69498, 79902, 96222

Even triples of practical numbers are infrequent as can be seen from the initial sequence members of OEIS A287682:


A287682



Triples of practical numbers: numbers n such that n-2, n, n+2 are all practical numbers.

Here are the members up to 40,000:

4, 6, 18, 30, 198, 306, 462, 702, 1482, 2550, 3330, 4422, 5778, 6102, 6498, 9042, 11178, 11778, 14418, 15498, 17298, 17442, 19458, 20862, 21582, 22878, 23322, 23550, 25230, 26622, 26862, 26910, 27378, 30210, 34542, 36738, 38610, 39006, 39102

So these are just a few ways in which 26862 is special and their combination of course makes the number unique.

Thursday, 24 March 2022

Doublets, Triplets etc.

One of the many properties associated with my diurnal age today of 26553 is that it's a member of OEIS A116057


  A116057

\(n\) times \( \Pi(n) \) is made of nontrivial runs of identical digits, where \( \Pi(n) \) is the prime counting function that returns the number of primes less than or equal to a given number.


It took me a little thought to get an algorithm that would return the members of this sequence but eventually I succeeded. While it may not be the most elegant of algorithms, it does get the job done. I've embedded the code from SageMathCell (permalink) below:


As can be seen the initial members of the sequence, up to 40,000, are:

[11, 37, 66, 154, 332, 750, 1696, 4000, 13684, 22308, 26640, 26653, 30327]

Taking the last member of the sequence, it can be seen that:$$ 30377 \times { \Large \Pi } (30327) =99442233 $$The algorithm is easily modifiable and below it is used to generate the initial terms of OEIS A033023:


 A033023

Numbers whose base-10 expansion has no run of digits with length < 2.     



Here the members of sequence, up to 40,000, are:

[11, 22, 33, 44, 55, 66, 77, 88, 99, 111, 222, 333, 444, 555, 666, 777, 888, 999, 1100, 1111, 1122, 1133, 1144, 1155, 1166, 1177, 1188, 1199, 2200, 2211, 2222, 2233, 2244, 2255, 2266, 2277, 2288, 2299, 3300, 3311, 3322, 3333, 3344, 3355, 3366, 3377, 3388, 3399, 4400, 4411, 4422, 4433, 4444, 4455, 4466, 4477, 4488, 4499, 5500, 5511, 5522, 5533, 5544, 5555, 5566, 5577, 5588, 5599, 6600, 6611, 6622, 6633, 6644, 6655, 6666, 6677, 6688, 6699, 7700, 7711, 7722, 7733, 7744, 7755, 7766, 7777, 7788, 7799, 8800, 8811, 8822, 8833, 8844, 8855, 8866, 8877, 8888, 8899, 9900, 9911, 9922, 9933, 9944, 9955, 9966, 9977, 9988, 9999, 11000, 11100, 11111, 11122, 11133, 11144, 11155, 11166, 11177, 11188, 11199, 11222, 11333, 11444, 11555, 11666, 11777, 11888, 11999, 22000, 22111, 22200, 22211, 22222, 22233, 22244, 22255, 22266, 22277, 22288, 22299, 22333, 22444, 22555, 22666, 22777, 22888, 22999, 33000, 33111, 33222, 33300, 33311, 33322, 33333, 33344, 33355, 33366, 33377, 33388, 33399, 33444, 33555, 33666, 33777, 33888, 33999]

Of course, the algorithm is easily modifiable to find numbers whose base-\(n\) expansion has no run of digits with length < 2. Here \(n \) can range from 2 to 36. For example, if \(n\)=16, then the numbers up to 40,000 that satisfy are:

[17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255, 273, 546, 819, 1092, 1365, 1638, 1911, 2184, 2457, 2730, 3003, 3276, 3549, 3822, 4095, 4352, 4369, 4386, 4403, 4420, 4437, 4454, 4471, 4488, 4505, 4522, 4539, 4556, 4573, 4590, 4607, 8704, 8721, 8738, 8755, 8772, 8789, 8806, 8823, 8840, 8857, 8874, 8891, 8908, 8925, 8942, 8959, 13056, 13073, 13090, 13107, 13124, 13141, 13158, 13175, 13192, 13209, 13226, 13243, 13260, 13277, 13294, 13311, 17408, 17425, 17442, 17459, 17476, 17493, 17510, 17527, 17544, 17561, 17578, 17595, 17612, 17629, 17646, 17663, 21760, 21777, 21794, 21811, 21828, 21845, 21862, 21879, 21896, 21913, 21930, 21947, 21964, 21981, 21998, 22015, 26112, 26129, 26146, 26163, 26180, 26197, 26214, 26231, 26248, 26265, 26282, 26299, 26316, 26333, 26350, 26367, 30464, 30481, 30498, 30515, 30532, 30549, 30566, 30583, 30600, 30617, 30634, 30651, 30668, 30685, 30702, 30719, 34816, 34833, 34850, 34867, 34884, 34901, 34918, 34935, 34952, 34969, 34986, 35003, 35020, 35037, 35054, 35071, 39168, 39185, 39202, 39219, 39236, 39253, 39270, 39287, 39304, 39321, 39338, 39355, 39372, 39389, 39406, 39423]

In the OEIS, this is sequence A033029:


 A033029

Numbers whose base-16 expansion has no run of digits with length < 2.    


Here is a permalink to the algorithm. For example, take 26316 from this list as an example. We have \(26316_{{\small 10}}=66\text{cc}_{ {\small 16}}\).

The algorithm can be used to find some numbers with interesting properties. For example, in the range up to one million, what members of OEIS A033023 (sequence listed earlier) have a totient that is also a member of OEIS A033023? I won't embed the code but here is a permalink to the algorithm that I used to find the numbers with the required property. It turns out that there are only three:
  • \( \phi(9922)=4400\)
  • \( \phi(662233)=554400\)
  • \( \phi(990022)=449900\)

Tuesday, 12 March 2019

Euler's Totient Function

From Wikipedia:
Euler's totient function counts the positive integers up to a given integer n that are relatively prime to n. It is written using the Greek letter phi as φ(n) or ϕ(n), and may also be called Euler's phi function.
Today I turned 25545 days old and one of the points of interest about this number is that it forms a pair with 25546, both having the property that their totient values are the same (12480). The first member of the pairs of numbers with this property up to and including 25545 is given by OEIS A001274: numbers \(n\) such that \( \phi(n) = \phi(n+1) \):
1, 3, 15, 104, 164, 194, 255, 495, 584, 975, 2204, 2625, 2834, 3255, 3705, 5186, 5187, 10604, 11715, 13365, 18315, 22935, 25545
Note that for all prime numbers \(p\), \( \phi(p)=p-1 \). These totient values (totatives) represent the maximum possible for numbers up to \(p\) and their points lie on the maximal line as shown in Figure 1:


Figure 1: generated using SageMathCell using
plot(lambda x:euler_phi(int(x)), (x,1,100))

From Figure 1 it can be seen that the totient values (totatives) for 1 and 2, 3 and 4, 15 and 16 are the same. Note that 5186 and 5187 themselves form a pair, meaning that the totient values of 5186, 5187 and 5188 are the same (2592). This is the only triplet that occurs for numbers up to \( 10^{13} \).

Euler's totient function is a multiplicative function, meaning that if two numbers \(m\) and \(n\) are relatively prime, then \( \phi(m \times n) = \phi(m) \times \phi(n) \). This is important in developing Euler's product formula along with the fact that: $$\phi(p^k)=p^{k-1} \bigg (1-\frac{1}{p} \bigg )$$The product formula is: $$\phi(n)=n \prod_{p|n} \bigg (1-\frac{1}{p} \bigg )$$Applying this to today's number 25545=3 * 5 * 13 * 131, we note that:$$ \phi(25545) = 25545\bigg (1-\frac{1}{3} \bigg ) \bigg (1-\frac{1}{5} \bigg ) \bigg (1-\frac{1}{13} \bigg ) \bigg (1-\frac{1}{131} \bigg )=12480$$