Note 1: This questions requires some new definitions, namely "continuous primeness" which I have made. Everyone is welcome to improve the definition without altering the spirit of the question. Click here for a somewhat related question.

A number is either prime or composite, hence primality is a binary concept. Instead I wanted to put a value of primality to every number using some function $f$ such that $f(n) = 1$ iff $n$ is a prime otherwise, $0 < f(n) < 1$ and as the number divisors of $n$ increases, $f(n)$ decreases on average. Thus $f(n)$ is a measure of the degree of primeness of $n$ where 1 is a perfect prime and 0 is a hypothetical perfect composite. Hence $\frac{1}{N}\sum_{r \le N} f(r)$ can be interpreted as a measure of average primeness of the first $N$ integers.

After trying several definitions and going through the ones in literature, I came up with:

Define $f(n) = \dfrac{2s_n}{n-1}$ for $n \ge 2$, where $s_n$ is the standard deviation of the divisors of $n$.

One advantage of using standard deviation is that even if two numbers have the same number of divisor their value of $f$ appears to be different hence their measure of primeness will be different.

Question 1: Does the average primeness tend to zero? i.e. does the following hold?

$$ \lim_{N \to \infty} \frac{1}{N}\sum_{r = 2}^N f(r) = 0 $$

Question 2: Is $f(n)$ injective over composites? i.e., do there exist composites $3 < m < n$ such that $f(m) = f(n)$?

My progress

  • $f(4.35\times 10^8) \approx 0.5919$ and decreasing so the limit if it exists must be between 0 and 0.5919.
  • For $2 \le i \le n$, the minimum value of $f(i)$ occurs at the largest highly composite number $\le n$.

Note 2: Here standard deviation of $x_1, x_2, \ldots , x_n$ is defined as $\sqrt \frac{\sum_{i=1}^{n} (x-x_i)^2}{n}$. Also notice that even if we define standard deviation as $\sqrt \frac{\sum_{i=1}^{n} (x-x_i)^2}{n-1}$ our questions remain unaffected because in this case in the definition of $f$, we will be multiplying with $\sqrt 2$ instead of $2$ to normalize $f$ in the interval $(0,1)$.

Note 3: Posted this question in MO and got answer for question 1. Indeed the limit tends to zero. Question 2 is still open.

Nilotpal Sinha
  • 15,471
  • 4
  • 26
  • 73
  • Is your second statement about the minimum of $f$ obvious? I'm unable to come up with an argument. – user113102 Apr 05 '19 at 21:30
  • 9
    Why involve the standard deviation? Why not something simpler, like $2/d(n)$, where $d(n)$ is the number of divisors of $n$? – Gerry Myerson Apr 06 '19 at 04:06
  • 5
    @GerryMyerson: Here is a more technical answer why standard deviation. If two numbers have the same number of divisors then the value $2/d(n)$ is same for both but the values of $f(n)$ is different. So under my definition, I will consider the number with smaller value of $f(n)$ to have a greater primness because we are not just measuring how many divisors a number has but also how scattered these divisors are. At the moment, I don't know if $f(n)$ is unique. I will add this to the question. – Nilotpal Sinha Apr 06 '19 at 07:27
  • 1
    I have written some code for this in R: `stanfun <- function(n){sd(divisors(n))/(n-1)};funstan <- function(m){sum(sapply(2:m, function(i){stanfun(i)}))/m}`, so $\frac1{10000}\sum\limits_{r=1}^{10000}f(r)$ is given by `funstan(10000)` which outputs $0.404801$. – TheSimpliFire Apr 06 '19 at 19:23
  • @TheSimpliFire I have added my Sagemath code above – Nilotpal Sinha Apr 07 '19 at 03:23
  • 2
    You might want to rephrase "is $f(n)$ unique" to "is $f(n)$ injective". At first glance I thought you didn't know whether $f(n)$ was well-defined. – YiFan Apr 07 '19 at 04:45
  • @YiFan Sure done. – Nilotpal Sinha Apr 07 '19 at 04:52
  • I don't get why you say that $f(n)=1$ if $n$ is prime. For a prime $p$, $$f(p)=\frac{2\sqrt{\frac{\left(\frac{p-1}2\right)^2+\left(\frac{1-p}2\right)^2}{2-1}}}{p-1}=\sqrt2$$ so shouldn't it be $f(n)=\frac{\sqrt2 s_n}{n-1}$? Furthermore the sum should be from $r=2$ to $N$ as $1/(r-1)$ is undefined when $r=1$. – TheSimpliFire Apr 07 '19 at 07:31
  • @TheSimpliFire The difference is because of the the parameter 'bias = ' in the formula for calculating standard deviation in Sagemath. Check my source code above. For a prime $p$ we have 2*std(divisors(p), bias = True).n()/(p-1) = 1 and 2*std(divisors(p), bias = True).n()/(p-1) = $\sqrt 2$. I have used bias = True because the range $(0,1)$ looks more elegant than $(0, \sqrt 2)$. Also $r = 2$ is correct. However, regardless of bias = True or False, the the question remain unchanged as $f$ is only gets multiplied by a scaling factor so we are good. – Nilotpal Sinha Apr 07 '19 at 08:35
  • I meant your second sentence below the Note at the start of your post. [Here](https://i.stack.imgur.com/PlgJh.png) is a plot of the limit for $N\le 10000$. – TheSimpliFire Apr 07 '19 at 08:37
  • @TheSimpliFire My graph is identical to yours but instead of converging to about $0.4$ as in your case, it is converging to about $0.4 \times \sqrt 2 \approx 0.59$. This is because of bais = True or False in your formula for calculating standard deviation. You have used bias = False and got the limit 0.4. I have used bias = True and got $f(320700000) = 0.594127573872085$ – Nilotpal Sinha Apr 07 '19 at 08:43
  • We can continue this discussion in [chat](https://chat.stackexchange.com/rooms/82585/thesimplifires-chatroom) – TheSimpliFire Apr 07 '19 at 08:48
  • @TheSimpliFire Sure joining – Nilotpal Sinha Apr 07 '19 at 08:50
  • Why do you care about the standard deviation? I understand that $s_n$ may be different even for a number with the same amount of divisors, but if all you want is to measure “primeness,” then why complicate this with standard deviation? It seems like this question now accounts for more than just primeness. It now considers smoothness of an integer (or something like it). – JavaMan Apr 07 '19 at 12:14
  • @JavaMan Yes, standard deviation gives more information than just the number of divisors. But to be honest, I don't exactly know how to interpret standard deviation completely in the context of primeness. One of the reason for using standard deviation was because some progress was already made on the standard deviation of the divisors of the first $n$ natural numbers. Check this post. https://math.stackexchange.com/questions/2773289/sum-of-the-standard-deviation-of-the-divisors-of-a-number – Nilotpal Sinha Apr 07 '19 at 12:29
  • @NilotpalKantiSinha I'm not sure I follow why Question 2 is a question. Isn't $f(p) = f(q) = 1$ for any primes $p,q$ by construction? – Michael Biro Apr 07 '19 at 12:47
  • I can't seem to recreate your test cases. Do you mean proper divisors, etc? Could you post a couple of low-valued test cases for this so that we can make sure we're evaluating the same thing? – Him Aug 02 '19 at 09:36
  • @Scott E.g. For $n = 19$, the divisors are $1,19$ and the variance of these two divisors is $82$. Similarly for $n = 20$, the divisors are $1,2,4,5,10,20$ and their variance is $42$ – Nilotpal Sinha Aug 02 '19 at 09:55
  • In that case, for 320700000, the divisors are: $[1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 25, 30, 32 ......... 13362500, 16035000, 20043750, 21380000, 26725000, 32070000, 40087500, 53450000, 64140000, 80175000, 106900000, 160350000, 320700000]$ with a variance of $1048437529950912.5$. However, this gives $f(320700000) \approx 0.201930684009565$ = 2 times the square root of the variance divided by 320700000 - 1. What am I missing here? – Him Aug 02 '19 at 10:12
  • @Scott You must have done an error. Try this Sagemath code (N(variance(divisors(320700000), bias = True), digits = 10))^0.5 / (320700000-1) you will get 0.1009653420 – Nilotpal Sinha Aug 02 '19 at 10:43
  • Yes, that is what I got. I was confused when you reported getting 0.59 above. – Him Aug 02 '19 at 11:59
  • $0.59$ is the average of all the values for $n \le 4.35 \times 10^8$ – Nilotpal Sinha Aug 02 '19 at 12:29
  • @daniel I do not see how Erod Kac theorem directly implies that the avove limit tends to zero? – Nilotpal Sinha Sep 30 '19 at 06:44
  • @daniel After I posted in MO, it was answered. But I am not sure if a similar question was asked in MSE and answered – Nilotpal Sinha Sep 30 '19 at 11:51
  • 2
    @daniel One of the reasons why I invented this definition was because even if two numbers have the same number of divisors or the same number distinct prime divisors, their value of $f(n)$ was found to be unique. In that way, $f(n)$ can uniquely identify $n$ but $\omega(n)$ or $d(n)$ cannot uniquely identify $n$. – Nilotpal Sinha Sep 30 '19 at 11:55

0 Answers0