8
$\begingroup$

Let us call $n>1$ simple if every prime power $q$ with $q-1 \mid n-1$ is a prime number. (Please let me know if there is already an established name for these numbers.) The simple numbers $\leq 100$ are

2,3,5,6,11,12,14,18,20,21,23,24,26,30,35,38,39,42,44,45,47,48,51,54,56,59,60,62,66,68,69,72,74,75,77,80,83,84,86,87,90,93,95,96,98

This is A366343. It seems that on average about every second number is simple. This leads to the following question:

Question. Does the set of simple numbers have a natural density? If yes, is there an explicit formula? If not, can we at least compute lower asymptotic density and the upper asymptotic density? These are: $$\liminf_{n \to \infty} \frac{\# \text{ simple numbers } \leq n}{n}, \quad \limsup_{n \to \infty} \frac{\# \text{ simple numbers } \leq n}{n}$$

In numerical experiments with SageMath, the value jumps a bit between values around 0.46211. Here is my code:

def n_powers(n):
    """Computes the prime powers q with q-1 | n-1"""
    return [x+1 for x in divisors(n-1) if (x+1).is_prime_power()]

def is_simple(n):
    """Checks if n is a simple number"""
    return n > 1 and all(q.is_prime() for q in n_powers(n))

def simple_density(limit):
   """prints the proportions of simple numbers among the numbers 2 <= n <= limit"""
   n = 0
   simple_count = 0
   while (n < limit):
      n+=1
      if (is_simple(n)):
         simple_count += 1
      print(float(simple_count / n))

Then, simple_density(1000000) prints a lot of approximations.

Background. For simple numbers, there is a simple (!) proof of Jacobson's Theorem. See Equational proofs of Jacobson's Theorem.

$\endgroup$
8
  • 5
    $\begingroup$ Why don't you put it on OEIS? $\endgroup$ Commented Oct 6, 2023 at 16:58
  • 1
    $\begingroup$ @მამუკაჯიბლაძე I also found that there is no OEIS entry yet. I am not sure if the sequence is relevant enough. Why is an OEIS entry useful in the context of the question? Right now, I don't have much to say about these numbers except for one algebraic fact. $n$ is simple iff every $n$-field is a prime field iff every $n$-ring (=we have $x^n=x$) is additively generated by idempotents. (I will link the preprint which explains the background in more detail in a few days.) $\endgroup$ Commented Oct 7, 2023 at 0:14
  • 6
    $\begingroup$ If you have anything at all to say about them it’s worth putting up an entry. Between your experimental density calculation and your ring statement you have plenty to say for a first entry. It won’t help you solve your problem today but anyone that also encounters these numbers can quickly end up finding this mathoverflow post and use whatever source they found their numbers from here potentially. $\endgroup$ Commented Oct 7, 2023 at 3:19
  • 1
    $\begingroup$ Also the fact someone put some crazy sequence involving squares of floor functions (much less interesting than what you have here) enabled me to do some pattern matching here: mathoverflow.net/questions/455960/… so I’d say that really any sequence that comes from actual math is fair game to put up. And almost surely will be used one day. $\endgroup$ Commented Oct 7, 2023 at 3:20
  • 4
    $\begingroup$ @SidharthGhoshal done. oeis.org/A366343 $\endgroup$ Commented Oct 8, 2023 at 16:04

2 Answers 2

8
+300
$\begingroup$

We can get a quite good upper bound, and also a reasonably close lower bound, by determining and excluding sufficient values of $n$ which are not simple, i.e., where there's a prime power $q$ with $q - 1 \mid n - 1$ with $q$ not being prime. In particular, we'll use the smaller resulting congruence values to significantly limit what later values are required to be checked and used for increasing the exclusion. First, with the $3$ smallest such $q$, i.e., $4$, $8$ and $9$, we get

$$4 - 1 \mid n - 1 \;\;\to\;\; n \equiv 1 \pmod{3}$$

$$8 - 1 \mid n - 1 \;\;\to\;\; n \equiv 1 \pmod{7}$$

$$9 - 1 \mid n - 1 \;\;\to\;\; n \equiv 1 \pmod{8}$$

Note we can exclude checking any larger prime power where the resulting modulo, i.e., $q - 1$, is an integral multiple of any of the previous modulos, starting with the $3$ above. Thus, since the squares of all odd integers are congruent to $1$ modulo $8$, we only need to check odd powers of odd primes. Also, since $p^2 \equiv 1 \pmod{3}$ for primes $p \gt 3$, we only need to check odd powers of those primes which are congruent to $2$ modulo $3$. Further, for powers of $2$, to avoid multiples of $7$, we can exclude those where the exponent is a multiple of $3$. This already then becomes a quite sparse list, with it becoming very sparse rather quickly when more modulos are considered (e.g., we only need to check where the exponents themselves are primes). The only other values less than $100$, which add new congruences to check, are

$$27 - 1 \mid n - 1 \;\;\to\;\; n \equiv 1 \pmod{26}$$

$$32 - 1 \mid n - 1 \;\;\to\;\; n \equiv 1 \pmod{31}$$

The only two more after this (note that, for example, since $125 - 1 = 4(31)$, it's excluded since $31$ is already being used) less than $1$,$000$ are

$$128 - 1 \mid n - 1 \;\;\to\;\; n \equiv 1 \pmod{127}$$

$$243 - 1 \mid n - 1 \;\;\to\;\; n \equiv 1 \pmod{242}$$

To get the natural density resulting from combining the $q - 1$ values, we need to use the appropriate inclusion-exclusion adjustments, with Gustave C. Pekara's 1972 PhD thesis The Asymptotic Density of Certain Integer Sequences giving the specific formula, and proof of it, as Theorem $4.1$, on its page $52$ (page $56$ in the linked PDF file). In particular, for $m \ge 1$ values, with $q_i - 1$ for $1 \le i \le m$ being the checked values, the natural density $d_m$ is given by

$$\begin{equation}\begin{aligned} d_m = & \sum_{i = 1}^{m}\frac{1}{q_i - 1} - \sum_{i \lt j}\frac{1}{\operatorname{lcm}(q_i - 1, q_j - 1)} + \\ & \sum_{i \lt j \lt k}\frac{1}{\operatorname{lcm}(q_i - 1, q_j - 1, q_k - 1)} - \ldots + \frac{(-1)^{m - 1}}{\operatorname{lcm}(q_1 - 1, q_2 - 1, \ldots, q_m - 1)} \end{aligned}\end{equation}$$

For $m = 3$, the natural density of integers being excluded is

$$d_3 = \frac{1}{3} + \frac{1}{7} + \frac{1}{8} - \frac{1}{3\cdot 7} - \frac{1}{3\cdot 8} - \frac{1}{7\cdot 8} + \frac{1}{3\cdot 7\cdot 8} = 0.5$$

The adjustment for the $m$'th value being added, call it $a_m$ (so then $d_m = d_{m-1} + a_m$), is basically as stated in Computing the density of a set of multiples, i.e., it's

$$\begin{equation}\begin{aligned} a_m = & \frac{1}{q_m - 1} - \sum_{i \lt m}\frac{1}{\operatorname{lcm}(q_i - 1, q_m - 1)} + \\ & \sum_{i \lt j \lt m}\frac{1}{\operatorname{lcm}(q_i - 1, q_j - 1, q_m - 1)} - \ldots + \frac{(-1)^{m - 1}}{\operatorname{lcm}(q_1 - 1, q_2 - 1, \ldots, q_m - 1)} \end{aligned}\end{equation}$$

Thus, the adjustment $a_4$ to include the next value, i.e., $26$, using the $\operatorname{lcm}$ to get the denominator values (as shown above, and also stated in your comment) for this and all larger values, is

$$\begin{equation}\begin{aligned} a_4 & = \frac{1}{26} - \frac{1}{3\cdot 26} - \frac{1}{7\cdot 26} - \frac{1}{8\cdot 13} + \frac{1}{3\cdot 7\cdot 26} + \\ & \;\;\;\;\; \frac{1}{3\cdot 8\cdot 13} + \frac{1}{7\cdot 8\cdot 13} - \frac{1}{3\cdot 7\cdot 8\cdot 13} \\ & \approx 0.0165 \end{aligned}\end{equation}$$

Thus, a rough simple numbers natural density upper bound is

$$1 - (0.5 + 0.0165) = 0.4835$$

We can continue this for each new value to keep getting better upper bounds. Note that your answer shows that, using a SageMath code for all prime powers up to one or five million, the result is about $0.462118$. This fairly closely agrees with the value, stated in the comment, obtained by checking for all simple numbers up to $75$,$000$,$000$.


The $a_m$ adjustment expression given earlier is for the natural density of numbers $n - 1$ where $q_m - 1 \mid n - 1$, but $q_i - 1 \nmid n - 1 \;\forall\; 1 \le i \lt m$. Since we're excluding cases where there's an $1 \le i \lt m$ with $q_i - 1 \mid q_m - 1$ (since then $a_m = 0$), we therefore have

$$0 \lt a_m \lt \frac{1}{q_m - 1}$$

I did several online searches for an algebraic proof of the above expression. Although I didn't find anything, and wasn't able to come up with a proof myself (e.g., due to difficulties dealing with $\operatorname{lcm}$), I suspect this has been proven previously. Regardless, an approach that may work is to equally divide each summation term into the number of non-$m$ index values being used. For example, with the second summation, since the denominator is $\operatorname{lcm}(q_i - 1, q_j - 1, q_m - 1)$, then split each term into two halves. Next, combine all of the terms where each $q_i - 1$ (for $1 \le i \lt m$) is being used, and then find appropriate lower & upper bounds on the sums of those terms.

The fifth and higher terms, as explained, only involve prime powers $q_i$ which are to at least the third power. For powers of $2$, where the exponent is $\ge 5$, we only need to consider odd prime powers. Considering the larger value where these are exponents are just not multiples of $3$, then using the sums of those powers of $2$ forming geometric series, we get that this is a bit less than $\frac{64}{63}\left(\frac{1}{31} + \frac{1}{127}\right) \approx 0.04077$. Thus, using this, a bit more than $d_4$, and a value slightly larger than Apéry's constant (since all the checked higher prime exponents (e.g., $5$, $7$, etc.) of the primes are more than compensated by the unused summation terms), we get for all $m$ that

$$\begin{equation}\begin{aligned} d_m & \lt 0.0408 + 0.5166 + \sum_{i=3}^{\infty}\frac{1}{i^3} \\ & \lt 0.0408 + 0.5166 + \left(1.2021 - 1 - \frac{1}{2^3}\right) \\ & = 0.6345 \end{aligned}\end{equation}$$

Since the $d_m$ form a strictly increasing sequence with an upper bound, the montone convergence theorem states that it converges. The inequality above shows that this limit of $d_{\infty} = \lim_{m\to\infty}d_m$ is less than $1$, so the natural density of simple numbers also exists, and it's the positive $1 - d_{\infty}$.

The $1 - d_m$ values provide upper bounds for the simple numbers natural density, with each new $a_m$ adjustment making it more accurate. After calculating $1 - d_m$ up to some reasonably large $q_m - 1$, we can also then get a fairly good value for the natural density lower bound by determining an upper bound on the remaining $a_m$ adjustments left to add, such as by using the Apéry's constant terms, or perhaps by using something more refined instead.

Regarding analytically determining the simple numbers natural density, the challenges involved with using $\operatorname{lcm}$'s suggests to me that it's unlikely to be successful with my approach here. Instead, a rather different method would be required.

$\endgroup$
13
  • 1
    $\begingroup$ This is a great answer! Thanks a lot. I already understand the gist of it, and will try to understand the details. Meanwhile, I have updated my question a bit (sorry for that!), since I think that maybe the set has no natural density. $\endgroup$ Commented Oct 7, 2023 at 2:35
  • 1
    $\begingroup$ @MartinBrandenburg You're welcome. Regarding updating your question, since what I show in my answer indicates the values to check on grows very quickly, I believe there is a natural density, relatively close to your $0.46$ estimate. Out of curiosity, up to what value have you checked so far to get your $0.46$ value? Also, as for your statement the natural density "jumps a bit", I'm quite certain that if you were determine the minimum & maximum values over each of a certain range (e.g., every 1000), you'll find their difference will almost always decrease, become quite small rather quickly, ... $\endgroup$ Commented Oct 7, 2023 at 3:10
  • 1
    $\begingroup$ @MartinBrandenburg (cont.) and that the minimums for each range will generally all be increasing, while the maximums for each range will be decreasing, further indicating they are converging to a value. Note that extending what I suggest analytically, by using certain estimates, will allow both a further refinement of the possible range of the natural density, as well as indicate that this exists. However, I believe this is outside the scope of your original question, and also it's not my area of expertise so I'm not sure how robust any proof I write would be. Regardless, good luck with this. $\endgroup$ Commented Oct 7, 2023 at 3:14
  • 1
    $\begingroup$ To answer your first question: I have tested the first 75000000 numbers (and the computation is ongoing), and the proportion up to that number is 0.46211810666666664. The boldface numbers are somewhat fixed. The next decimal is probably either 0 or 1 (currently it is still jumping). If this sequence is converging, it converges slowly as hell. $\endgroup$ Commented Oct 7, 2023 at 3:33
  • 1
    $\begingroup$ I now understand your answer in detail. Your approach will help a lot to calculate the proportions! I was a bit confused by the notation, I thought $3(7)$ means some special like the modulus, but it is just $3 \cdot 7$. (I suggest to edit this.) If $q_1,\dotsc,q_n$ are the first "non-redundant" prime-powers, then our approximation is this one, right? $$\sum_i \frac{1}{(q_i-1)} - \sum_{i < j} \frac{1}{(q_i-1) (q_j-1)} + \sum_{i < j < k} \frac{1}{(q_i-1) (q_j-1) (q_k-1)} \mp$$ $\endgroup$ Commented Oct 7, 2023 at 14:36
4
$\begingroup$

This is a comment to John's answer, but since comments cannot have codeblocks, let me write a CW answer.

John's approach is to let $q_1,q_2,q_3,\dotsc$ be a list of proper prime powers so that $q_i - 1 \not\mid q_n-1$ for all $i < n$. Then, $$1 - \sum_i \frac{1}{(q_i-1)} + \sum_{i < j} \frac{1}{\mathrm{lcm}(q_i-1,q_j-1)} - \sum_{i < j < k} \frac{1}{\mathrm{lcm}(q_i-1,q_j-1,q_k-1)} \pm$$ approximates the natural density. Here is the SageMath code to calculate this sum:

def relevant_powers(limit):
    """lists the proper prime powers q such that q-1 is not a multiple of x-1 for previous powers"""
    powers = []
    for q in srange(2,limit+1):
        if q.is_prime_power() and not q.is_prime() and all([(q-1)%(x-1) > 0 for x in powers]):
            powers.append(q)
    return powers

def approximate_density(limit):
    """approximates the natural density of simple numbers using inclusion-exclusion principle"""
    sum = 0
    powers = relevant_powers(limit)
    for k in range(0,len(powers)+1):
        for selection in Subsets(powers,k):
            sum += (-1)^k * 1/lcm([x-1 for x in selection])
            print(float(sum)) # print progress
    return float(sum)

Then, executing approximate_density(1000000) yields 0.46211885256102014 at some point and it does not change anymore. (Of course, it does, but SageMath's precision is not enough.)

However, executing approximate_density(5000000) yields 0.462118293064357 at some point and it does not change anymore. I am not sure what this means.

$\endgroup$
5
  • $\begingroup$ Unfortunately, I know very little about SageMath (although I've programmed several different languages over the past 44 years, I've mostly been doing programming in C/C++, and more recently C#). Nonetheless, I suspect the issue (i.e., of the value no longer changing after a certain point) is due to adding relatively small values to a much larger value causing nothing to change due to their relative sizes being too different. As a simple example, have that if the ratio (of larger to smaller) of 2 values is more than $10^7$, then adding them will just result in the larger value. ... $\endgroup$ Commented Oct 9, 2023 at 3:20
  • $\begingroup$ (cont.) Then adding, one at a time, of 1.0 to 100 instances of $10^{-8}$ will result in the value remaining at 1.0. However, first adding the 100 instances of $10^{-8}$ to each other will result in a value of $10^{-6}$, so then adding this to 1.0 will result in $1.0000001$ instead. Thus, it's generally better to sum the smaller values before the larger ones to avoid this problem occurring. In particular, in your "relevant_powers" function, switch the order around of the list of values in your "powers" value before returning it. ... $\endgroup$ Commented Oct 9, 2023 at 3:21
  • $\begingroup$ (cont.) Also, in your "approximate_density" function, have the line "for k in range(0,len(powers)+1)" have "k" go from the largest to smallest values instead. This should help to get avoid the problem of the values stopping changing. However, another thing to consider is, although it will slow down the operation, is increasing the precision of the "sum" variable. For information about one way to do this (possibly the best, or even only, one), please see SageMath's Arbitrary Precision Real Numbers article. $\endgroup$ Commented Oct 9, 2023 at 3:21
  • $\begingroup$ I realized one more thing you should do re: generally adding a set of values from the smallest to the largest. This is that, in "approximate-density", you should use an intermediate variable for summing the values in the inner loop, i.e., starting with "for selection in Subsets(powers,k):", and then add the resulting intermediate value to "sum" in the outer loop. $\endgroup$ Commented Oct 9, 2023 at 5:31
  • 1
    $\begingroup$ Thanks a lot for the suggestions! I will try them 🤝 $\endgroup$ Commented Oct 9, 2023 at 7:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .