# Square roots and prime numbers

Definitions:

Here I present a novel conjecture using basic mathematical tools like the sum of the divisors of an integer $$n$$ called $$\sigma(n)$$, the sum of the squares of the positive divisors of n called $$\sigma_2(n)$$ I also use the prime-counting function which is the function counting the number of prime numbers less than or equal to some real number n. The prime-counting function is called $$\pi(n)$$

Conjecture:

We introduce the following expression called $$A$$:

$$A = \sigma_2(\pi(n) − \sigma(n + 2))$$

We focus on numbers ends with 2. I calculate $$A − 1$$ and so the new number ends with 1. Then I calculate the square root of this number ends with 1. When the number is an integer, it is always prime.

Example:

Let $$n = 100547$$, we have $$A = \sigma_2(9639 − \sigma(100549)) = 8264809922$$ We have $$A − 1 = 8264809921$$ and we calculate the square root of 8264809921 and we have $$\sqrt{A−1} = \sqrt{8264809921} = 90911$$ and 90911 is prime

Computing

The conjecture has been checked up to $$n=2,000,000$$ with the following Python program:

https://onlinegdb.com/0C8cDRpu6

The conjecture is true 74408 times.

Questions

1. Is this conjecture interesting?
2. Is it possible to prove this conjecture or to find counter-example?
• The conjecture looks very ad hoc to me, so I am pretty certain that it is false. How many positive examples did you find up to $n=2000000$? Commented Aug 5 at 23:45
• Why do you expect that I (or anyone here) know how to run a C++ program? We are mathematicians, not programmers. It's your program, so please use it to answer my question. Commented Aug 6 at 0:12
• I think what you observe is this. If $m$ is prime, then $\sigma_2(m)-1$ is a square, namely $m^2$. If $m$ is composite, then $\sigma_2(m)-1$ is rarely a square, and it happens even more rarely that such an $m$ is of the form $\sigma(n+2)-\pi(n)$. Commented Aug 6 at 1:13
• My point is that all the positive examples (in the given range), where you end up with a prime, are such that $\sigma(n+2)-\pi(n)$ is itself a prime, the same prime. For example, in the case of $n=100547$, the final prime $90911$, which is just $\sigma(n+2)-\pi(n)$. Your question is not really about $\sigma(n+2)-\pi(n)$, but about the integers $m$ for which $\sigma_2(m)-1$ is a square number. Most of these $m$'s are primes: it is virtually impossible to find a composite $m$ with this property as such $m$'s are so rare. Commented Aug 6 at 2:07
• @WillJagy Yes, I was sloppy when I wrote that comment. The set of non-prime $m$'s up to $10^7$ for which $\sigma_2(m)-1$ is a square equals $\{1,6,40,136,2696,3352,46976,223736,5509736\}$. Probably there are infinitely many such $m$'s even when you add the condition that $\sigma_2(m)\equiv 2\pmod{10}$ and $m$ lies in the range of $\sigma(n+2)-\pi(n)$. And such an $n$ would falsify the OP's conjecture. Probably the OP's conjecture is the result of an evolution where artificial conditions were gradually added to make the counterexamples disappear. Commented Aug 6 at 3:41

I am now inclined to believe that the OP's conjecture is true, and I present some ideas to support this. If $$n$$ is a counterexample, then $$m:=\sigma(n+2)-\pi(n)$$ is a composite number such that $$\sigma_2(m)-1$$ is a square number ending in $$1$$. The goal would be to prove that there is no such $$m$$ (regardless of $$n$$).

Let us focus on the composite numbers $$m$$ such that $$\sigma_2(m)-1$$ is a square number. These numbers are listed at OEIS, and it seems that they are all even. Let us assume this, and let $$k>0$$ be the exponent of $$2$$ in $$m$$. I claim that $$k$$ is odd. To see this, observe that every divisor of $$\sigma_2(2^k)$$ is congruent to $$1$$ modulo $$4$$, because it is an odd number dividing $$\sigma_2(m)$$, which is a square number plus $$1$$. However, if $$k$$ is even, then $$\sigma_2(2^k)=\frac{4^{k+1}-1}{3}=\frac{(2^{k+1}+1)(2^{k+1}-1)}{3}$$ is divisible by $$2^{k+1}-1$$, which is congruent to $$3$$ modulo $$4$$. So $$k$$ is odd (under the standing assumption that $$m$$ is even). But this implies that $$\sigma_2(2^k)$$ is divisible by $$5$$, because in the previous display $$4^{k+1}=16^{(k+1)/2}$$ is congruent to $$1$$ modulo $$5$$. Hence $$\sigma_2(m)$$ is divisible by $$5$$, and therefore $$\sigma_2(m)-1$$ does not end in $$1$$.

To summarize, the OP's conjecture follows from the more natural conjecture that the linked OEIS sequence consists of even numbers.

• Thank you for your answer. Is it a proof? Commented Aug 7 at 2:06
• @Sulfura It is not a complete proof. What I show is that as long as $m=\sigma(n+2)-\pi(n)$ is even, your conjecture is true. In addition, it is plausible that the remaining case, i.e. when $m=\sigma(n+2)-\pi(n)$ is odd, produces no counterexample. Commented Aug 7 at 2:50
• I'm not so sure about absence of odd terms in OEIS A318169. Here is a near-miss: were $p:=411706627786612628571$ a prime, $11^4\cdot p$ would be such a term as $\sigma_2(11^4)(1+p^2)-1$ is a square. Commented Aug 7 at 20:17
• @MaxAlekseyev Yes, it is hard to make a guess. The question has a similar flavor (at least to me) as the existence of odd perfect numbers. I agree that a more extensive search is necessary here (perhaps a clever search, not a bruce force search). Please keep us updated! Commented Aug 7 at 20:48

This conjecture is part of the larger conjecture:

$$A = \sigma_2(n) \ \ \text{ where } \ \ 1 <= n < \infty$$

with the same other conditions:

If $$\ A \$$ has a last digit of $$\ 2 \$$, and if $$\sqrt{A - 1}$$ is an integer, then $$\sqrt{A - 1}$$ is also a prime number.

• Yes, I emphasized this in my response: "The goal would be to prove that there is no such $m$ (regardless of $n$)." Commented Aug 7 at 1:22
• It was proven with a simple code that there is no counterexample for$\ \ n<100e6 \ \$(just adjust the Python code in the main post). Commented Aug 7 at 17:45
• My response and the linked OEIS page make it clear that there is no counterexample up to $2\cdot 10^{12}$. Also, it suffices to check odd numbers only (cf. my response). Commented Aug 7 at 18:42