$\omega:\Bbb N\to\Bbb N$ is prime omega function such that $\omega(n)=\sum_{p\mid n}1$. Is there are infinitely many $n$ such that $\omega(n^2+2n)=2$?

If twin prime conjecture is true, then there exists infinitely many $p\in\Bbb P$ such that $p+2\in\Bbb P$, so $\omega(p^2+2p)=2$.

And also Mersenne prime conjecture is true, then there exists infinitely many $p\in\Bbb P$ such that $2^p-1\in\Bbb P$. So when I let $n=2(2^p-1)$ for Mersenne prime $2^p-1$, then $n+2=2^{p+1}$. So $n^2+2n=2^{p+2}(2^p-1)$, that means $\omega(n^2+2n)=2$.

Since twin prime conjecture and Mersenne prime conjectures are both likely true, so I suspect there are infinitely many $n$ such that $\omega(n^2+2n)=2$, but I cannot go further.

I'll appriciate with your help.

+) There are another way to make $\omega(n^2+2n)=2$ as $n=p^r, n+2=q^s$ as $n=7, 25\cdots$. I'm try to prove this part, but totally stuck.

  • 1
    $\begingroup$ Those are the only ways to have $\omega(n(n+2))=2$, right? So if you could prove $\omega(n(n+2))=2$ infinitely often, you would have proved that at least one of the two notorious conjectures is true. So, I don't think you're going to make any progress on this problem, not without some outstanding new insight. $\endgroup$ Jan 14 at 3:52
  • $\begingroup$ I don't know if this is known (surely no), but you can check out this question and the literature surrounding Chen's theorem: mathoverflow.net/questions/217554/… $\endgroup$ Jan 14 at 3:53
  • 2
    $\begingroup$ @GerryMyerson any time $n=p^k-2$ is prime, with $p$ prime, you get an example. So $n=7,79$ are other examples. $\endgroup$ Jan 14 at 3:53
  • 1
    $\begingroup$ Oh thanks everyone! So this question is equivalent with twin prime conj. $\vee$ Mersenne prime conj. $\vee$ ~Pillai's conj.? And their three are all unsolved...? $\endgroup$
    – MH.Lee
    Jan 14 at 4:04
  • 1
    $\begingroup$ @Nightflight You're welcome. However, note Pillai's conjecture is only for differences of perfect powers, i.e., where $e_1 \gt 1$ and $e_2 \gt 1$ in my earlier comment. Thus, there's still the case where exactly one of $e_1$ and $e_2$ is $1$ left to consider. $\endgroup$ Jan 14 at 4:07

1 Answer 1


If gcd$(m,n)=1$, $\omega(mn)=\omega(m)+\omega(n). $

If $n$ is odd:

then gcd$(n,n+2)=1$, so $\omega(n^2+2n)=\omega(n)+\omega(n+2). $

$\omega(n)=0 \iff n=1$. $\omega(3) <> 2 \implies n>1, \omega(n)>0$ .

So if $n$ odd, then $n$ and $n+2$ must both be prime or powers of primes, the former case$\ \omega(n^2+2n)=2 $ if $ n$ is lesser of two twin primes.

If n is even:

$2=$gcd$(n,n+2)$. $n=2a$. $n=2(b-1) \implies a+1=b$


So only one odd prime can divide $a(a+1)$. This can only happen if $a$ or $a+1$ is a power of $2$.

If $a+1=2^p$ then $a=2^p-1$ and $n^2+2n=2^{p+2}(2^p-1)$ , the Mersenne Prime scenario you mention. Interestingly, this is also $8$ times a Perfect Number. This should also work if $2^p-1$ is a power of a prime, i.e. $2^q-p^z=1 \iff 2^q \equiv 1 \pmod{p^z}$. So $q \equiv 0 \pmod{\phi(p^z)} $ by Euler's Totient rule. $\phi(p^z)=p^z-p^{z-1}=p^{z-1}(p-1)$ So $q=kp^{z-1}(p-1)$.

A third possible scenario:

Suppose $a=2^q$. Then $n^2+2n=2^{q+2}(2^q+1)$

$0=4 \cdot 2^{2q}+4\cdot2^q-n(n+2)$


so $n=2^{q+1}$

We need $2^q+1$ be a power of a prime. This gives us 24, 80, 288, 1088,...

We need solutions of the form $p^z-2^q=1$

$-1\equiv2^q \pmod{p^z}, z>=1 $

Does such a $q$ only exist if $2$ is a primitive root for prime $p$?

Looks like there are 4 scenarios, twin primes and twin power of primes for odd $n$, Mersenne Primes/Perfect numbers, and powers of primes 1 greater than a power of 2 for even $n$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.