Showing posts with label exponents. Show all posts
Showing posts with label exponents. Show all posts

Tuesday, 12 November 2024

A Prime To Remember

My diurnal age today is 27617 and the second interesting property that I discovered about this number (my first being that it's prime) was the fact that:$$ \begin{align} 2^1+7^1+6^1+1^1+7^1 &= 23 \\2^2+7^2+6^2+1^2+7^2 &= 139 \\2^3+7^3+6^3+1^3+7^3 &= 911 \end{align}$$The sums of the digits raised to the first, second and third powers (23, 139 and 911) are all prime. Numbers with this property constitute OEIS A176179:


A176179
: primes such that the sum of digits, the sum of the squares of digits and the sum of 3rd powers of their digits is also a prime.

In the range up to 40,000, there are 322 numbers that are members of this sequence. They are:

11, 101, 113, 131, 199, 223, 311, 337, 353, 373, 449, 461, 463, 641, 643, 661, 733, 829, 883, 919, 991, 1013, 1031, 1103, 1301, 1439, 1451, 1471, 1493, 1499, 1697, 1741, 1949, 2089, 2111, 2203, 2333, 2441, 2557, 3011, 3037, 3307, 3323, 3347, 3491, 3583, 3637, 3659, 3673, 3853, 4049, 4111, 4139, 4241, 4337, 4373, 4391, 4409, 4421, 4481, 4603, 4663, 4733, 4919, 4931, 5303, 5503, 5527, 5639, 5693, 6043, 6197, 6337, 6359, 6373, 6719, 6733, 6791, 6917, 6971, 7411, 7433, 7691, 8209, 8353, 8803, 8887, 9091, 9109, 9341, 9413, 9419, 9431, 9491, 9901, 9941, 10099, 10103, 10141, 10211, 10301, 10499, 10909, 10949, 11003, 11047, 11113, 11117, 11131, 11159, 11171, 11173, 11243, 11261, 11311, 11317, 11399, 11423, 11443, 11489, 11519, 11621, 11731, 11777, 11821, 11939, 12011, 12101, 12143, 12161, 12211, 12347, 12413, 12437, 12451, 12473, 12541, 12583, 12611, 12743, 12853, 13001, 13049, 13171, 13241, 13313, 13331, 13339, 13421, 13441, 13487, 13711, 13933, 14011, 14051, 14071, 14107, 14143, 14251, 14321, 14327, 14341, 14387, 14431, 14543, 14549, 14723, 14783, 14891, 15241, 15401, 15443, 15823, 16097, 16361, 16631, 17041, 17401, 17483, 17609, 17627, 17977, 18121, 18149, 18211, 18253, 18523, 18743, 19009, 19139, 19319, 19333, 19391, 19403, 19777, 19841, 19913, 20023, 20089, 20333, 20441, 20809, 21011, 21101, 21121, 21143, 21211, 21341, 21347, 21611, 21767, 22003, 22027, 22111, 22229, 22447, 22481, 22483, 23417, 23581, 23741, 24113, 24137, 24151, 24247, 24281, 24317, 24371, 24443, 24821, 24977, 25057, 25183, 25253, 25411, 25453, 25523, 25583, 25589, 26111, 26177, 26399, 26717, 26993, 27143, 27431, 27479, 27527, 27617, 27749, 27947, 28111, 28351, 28513, 28559, 29989, 30011, 30307, 30323, 30347, 30367, 30491, 30637, 30703, 30763, 30853, 30941, 31247, 31333, 31393, 31847, 31991, 32141, 32303, 32411, 32969, 33023, 33113, 33203, 33311, 33331, 33353, 33391, 33533, 33863, 33931, 34019, 34127, 34141, 34211, 34217, 34439, 34703, 34721, 34781, 34871, 35069, 35083, 35281, 35803, 36037, 36073, 36161, 36299, 36307, 36383, 36389, 36697, 36833, 36929, 37003, 38053, 38639, 38693, 39041, 39119, 39133, 39191, 39313, 39443, 39667, 39863

However, 27617 has an even more exclusive claim to fame as shown below where the rightmost numbers represent digit sums. Here it is:$$ \begin{align}27617^1 &= 27617 \rightarrow 23 \\27617^2 &= 762698689 \rightarrow 61\\27617^3 &= 21063449694113 \rightarrow 53\\27617^4 &= 581709290202318721 \rightarrow 67\\27617^5 &=16065065467517436117857 \rightarrow 101\\27617^6 &=443668913016429033266856769 \rightarrow 127\\27617^7 &= 12252804370774720611730783389473 \rightarrow 131 \end{align}$$All the numbers on the right (23, 61, 53, 67, 101, 127 and 131) are prime. 27617 is the smallest prime with this property that qualifies it for membership in OEIS A131748:


A131748
: minimum prime that raised to the powers from 1 to \(n\) produces numbers whose sums of digits are also primes.

In the case of 27617, \(n=7\) and the initial members are: 2, 5, 739, 47, 4229, 2803, 27617, 142589, 108271, 2347283, 1108739, 300776929, 300776929, 14674550173, 92799126239

It would appear that 27617 is the only prime that is a member of both these OEIS sequences.

Tuesday, 14 February 2023

Divisibility of Integers by their Totients

I got to thinking about the conditions for a number to be divisible by its totient. It didn't take too long to see the pattern. Figure 1 shows the results for numbers up to 1024.


Figure 1: permalink

Clearly condition is that the numbers must by of the form \(2^p. 3^q\) where \(p>0\) and \(q \geq 0\). There are only 35 numbers in this range and, if we extend the range to 10 million, there are still only 178 numbers that satisfy.

These numbers form OEIS A007694:


 A007694

Numbers \(k\) such that \( \phi(k) \) divides \(k\).   
          

The initial members of the sequence are:

1, 2, 4, 6, 8, 12, 16, 18, 24, 32, 36, 48, 54, 64, 72, 96, 108, 128, 144, 162, 192, 216, 256, 288, 324, 384, 432, 486, 512, 576, 648, 768, 864, 972, 1024, 1152, 1296, 1458, 1536, 1728, 1944, 2048, 2304, 2592, 2916, 3072, 3456, 3888, 4096, 4374, 4608, 5184, 5832, 6144, 6912, 7776, 8192, 8748, 9216

The numbers must be even, that is they must contain a power of 2. If the numbers are only powers of 3 then the dividend is 1.5. Figure 2 shows the results in the range up to one million. All numbers are of the form \(3^p\) where \(p>0\).


Figure 2: permalink

What sort of numbers will produce a dividend of 2.5? Well, as it turns out, numbers of the form \(2^p.5^q\) where \(p>1\) and \(q>1\). See Figure 3 for the numbers in the range up to one thousand.


Figure 3: permalink

A dividend of 3.5 is produced by numbers of the from \(2^p.3^q.7^r \) where \(p>0\), \(q>0\) and \(r>0\). See Figure 4 for the numbers in the range up to one thousand.


Figure 4: permalink

Numbers involving 11 as a factor appear if the dividend is 2.2 where numbers are of the form \(2^p.11^q\) where \(p>0\) and \(q>0\). See Figure 5 where the range is up to ten thousand.


Figure 5: permalink

Numbers of the from \(2^p.11^q.23^q\) with \(p>0\), \(q>0\) and \(r>0\) produce a dividend of 2.3. See Figure 6 where the range is up to 100,000.


Figure 6: permalink

Numbers of the form \(2^p.3^q.31^r\) where \(p>0\), \(q>0\) and \(r>0\) produce a dividend of 3.1. Figure 7 shows the range up to ten thousand.


Figure 7: permalink

Numbers of the form \(2^p.3^q.11^r\) where \(p>0\), \(q>0\) and \(r>0\) produce a dividend of 3.3. See Figure 8 for numbers in the range up to one thousand.


Figure 8: permalink

More numbers emerge when we consider dividends like 3.25 and 3.75 but I'll stop there even though there is clearly room for further study of this topic. The following is a summary of what I found so far:
  • \( \dfrac{n}{\phi(n)}=k\) where \(k>0\) if numbers of form \(2^p.3^q\) with \(p>0\) and \(q \geq 0\)
  • \( \dfrac{n}{\phi(n)}=1.5\) if numbers of form  \(3^p\) with \(p>0\)
  • \( \dfrac{n}{\phi(n)}=2.2\) if numbers of form  \(2^p.11^q\) where \(p>0\) and \(q>0\)
  • \( \dfrac{n}{\phi(n)}=2.3\) if numbers of form \(2^p.11^q.23^q\) with \(p>0\), \(q>0\) and \(r>0\)
  • \( \dfrac{n}{\phi(n)}=2.5\) if numbers of form \(2^p.5^q\) with \(p>0\) and \(q>0\)
  • \( \dfrac{n}{\phi(n)}=3.1\) if numbers of form \(2^p.3^q.31^r\) where \(p>0\), \(q>0\) and \(r>0\)
  • \( \dfrac{n}{\phi(n)}=3.3\) if numbers of form \(2^p.3^q.11^r\) where \(p>0\), \(q>0\) and \(r>0\)
  • \( \dfrac{n}{\phi(n)}=3.5\) if numbers of form \(2^p.3^q.7^r \) with \(p>0\), \(q>0\) and \(r>0\)

Saturday, 21 November 2020

Personal Investigation: Part Four

This post builds on my three previous posts so it's best to look at those first in order to properly understand what I'm doing. These posts are:

It occurred to me that there's probably no reason to maintain \(k\) at a constant value and that the exponents could be variable. For example:$$a_n= \text{ sum of digits } \big (a_{n-1}^2+a_{n-2}^3+a_{n-3}^4\big ) \text { with }a_0=0, a_1=1,a_2=2$$Do we eventually end up in a loop? This is what I set out to investigate.

Let's start with the following SageMath code (permalink):

a, b, c= 0, 1, 2
L=[a, b, c]
for x in [1..31]:
    d=a^2+b^3+c^4
    d=sum(d.digits())
    L.append(d)
    a, b, c=b, c, d
print(L)

Here, instead of a single value for \(k\), the values are 2,3 and 4. The output of the algorithm reveals that, very quickly, a loop arises:
1, 2, 8, 10, 13, 24, 20, 32, 21, 30, 25, 25, 17, 33, 30, 28, 28, 29, 18, 18, 22, 13, 23, 21, 24, 25, 25, 26, 24, 39, 28, 28, 29

It would seem that, regardless of the starting values or the exponents, the series always ends up looping. For example, take starting values of \(a, b, c\)= 100, 191, 227 and exponents of 112, 223 and 454. Thus:$$a_n= \text{ sum of digits } \big (a_{n-1}^{112}+a_{n-2}^{223}+a_{n-3}^{454}\big ) \text { with }a_0=100, a_1=191,a_2=227$$Here the series reaches a maximum value 8328 and contains 275 distinct terms.

I've only explored the triad here but there's no reason to suppose that similar results hold true for the tetrad, pentad, hexad and beyond. It would seem that for constant powers, no matter how high, the series eventually repeats.

Wednesday, 18 November 2020

Personal Investigation: Part Two

This post follows on from a previous one so it's best to read that first in order to understand what I'm on about. Here is the link:
After my previous post on Triads, it occurred to me that the same behaviour might occur with dyads. Starting with two numbers instead of three, I investigated the behaviour of the sequence:$$a_n=\text{ sum of digits }\big (a_{n-1}^k+a_{n-2}^k \big ),a_0=0,a_1=1, k \geq 2$$Not surprisingly, the behaviour was the same, with loops developing for \(2 \leq k \leq 50\).

For example, consider the case of$$a_n= \text{ sum of digits } \big ( a_{n-1}^2+a_{n-2}^2 \big ),a_0=0, a_1=1$$Here we the sequence begins 0, 1, 1, 2, 5, 11, 11, 8, 14, 8, 8, 11, 14, 11, 11, 8, ... but we see that we have the loop shown in bold. The total number of terms generated is seven and these are 0, 1, 2, 5, 8, 11 and 14. The number of terms generated by the different values of \(k\) is as follows (the first element in the ordered pair is the \(k\) value and the second element is the number of terms):

[(2, 7), (3, 13), (4, 8), (5, 18), (6, 7), (7, 30), (8, 13), (9, 29), (10, 12), (11, 27), (12, 11), (13, 37), (14, 19), (15, 22), (16, 15), (17, 37), (18, 13), (19, 41), (20, 22), (21, 37), (22, 13), (23, 28), (24, 12), (25, 34), (26, 27), (27, 48), (28, 14), (29, 23), (30, 11), (31, 39), (32, 35), (33, 19), (34, 10), (35, 48), (36, 12), (37, 44), (38, 26), (39, 40), (40, 28), (41, 35), (42, 22), (43, 59), (44, 35), (45, 32), (46, 24), (47, 47), (48, 15), (49, 61), (50, 46)

It can be seen that the largest number of terms (61) occurs when \(k=49\). As for the maximum values, the sequence that arises is as follows:

14, 28, 35, 45, 56, 91, 83, 110, 98, 135, 128, 151, 155, 181, 197, 218, 200, 241, 275, 271, 296, 286, 308, 319, 341, 351, 350, 376, 353, 410, 443, 433, 395, 495, 443, 501, 551, 521, 548, 565, 614, 620, 614, 604, 611, 646, 641, 716, 701

Figure 1 shows the graph of this sequence and highlights its basically linear behaviour:


Figure 1

Figure 2 shows the code (permalink) to generate the necessary details: 


Figure 2

A logical continuation of this investigation would be to look at tetrads, pentads, hexads, heptads, octads, enneads, decads and so on. Let's take the case of the tetrad with \(k=2\):$$a_n=\text{ sum of digits } \big (a_{n-1}^2+a_{n-2}^2 +a_{n-3}^2 +a_{n-4}^2 \big ),a_0=0,a_1=1,a_2=2,a_3=3$$Here the sequence of terms generated is:

0, 1, 2, 3, 5, 12, 11, 20, 15, 17, 9, 23, 8, 18, 26, 18, 20, 14, 21, 11, 15, 20, 17, 9, 23, 21, 8, 8, 18, 20, 15, 5, 20, 6, 20, 15, 8, 14, 21, 17, 18, 8, 11, 24, 14, 21, 11, 11, 24, 17, 9, 14, 8, 9, 8, 9, 11, 14, 12, 11, 15, 20, 17, ...
Once again, a loop arises, shown in bold typeface above.

The total number of terms generated is 19: 

0, 1, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 23, 24 and 26.

For \(2 \leq k \leq 50 \), the sequence of terms for maximum values associated with each \(k\) is:
26, 28, 47, 56, 57, 82, 99, 118, 119, 147, 173, 183, 188, 206, 209, 214, 236, 282, 263, 271, 297, 311, 335, 338, 371, 357, 389, 409, 399, 442, 459, 468, 485, 457, 525, 541, 558, 567, 566, 633, 579, 651, 659, 666, 666, 699, 722, 714, 735, ...
Here is the permalink for the tetrad calculations. Figure 3 shows a graph of this sequence (up to the 50th term) and highlights once again the fact that the progression is basically linear. 


Figure 3