18

I'm trying to prove the following conjecture concerning twin primes and Euler's totient function, which I have verified for $n$ up to 1 billion.

For all $n \in \mathbb{N}$, $n+1$ and $n \phi (n) + 1$ are both perfect squares if and only if $n$ is a product of twin primes.

If is easy. Suppose $n = pq$ for primes $p$ and $q$ with $q=p+2$. Then

\begin{eqnarray} n+1 &=& pq + 1\\ &=& p(p+2) + 1\\ &=& (p+1)^2 \end{eqnarray}

and

\begin{eqnarray} n \phi (n) + 1 &=& pq(p-1)(q-1) + 1\\ &=& p(p+2)(p-1)(p+1) + 1\\ &=& p^4 + 2p^3 - p^2 - 2p + 1\\ &=& (p^2 + p -1)^2 \end{eqnarray}

I'm struggling with only if.

We know from $n = x^2 -1 = (x+1)(x-1)$ that $n$ must have a factor pair separated by 2. Based on the nature of the totient function I tried considering different cases based on the structure of the prime factorization.

In the case that $n$ is a semiprime we are done as the two factors must be twin primes, however, in the the case $n=pqr$, I get stuck. Suppose that $pq = r +2$ and we need to show that

\begin{eqnarray} n \phi (n) + 1 &=& pqr(p-1)(q-1)(r-1) + 1\\ &=& pq(pq-2)(p-1)(q-1)(pq-3) + 1 \\ &=& p^{4}q^{4}-p^{4}q^{3}-p^{3}q^{4}-4p^{3}q^{3}+5p^{3}q^{2}+5p^{2}q^{3}+p^{2}q^{2}-6p^{2}q-6pq^{2}+6pq + 1 \end{eqnarray}

cannot be a square. I tried evaluating the expression modulo small primes but it didn't appear useful. Is there a better approach to solving this case?

Is there a better way to approach the conjecture in general?

JMP
  • 517
  • 1
    What about weaker claims? Can you show that $n$ must be square free for instance? – lulu Oct 18 '23 at 11:53
  • For whatever it's worth, OEIS doesn't recognize the sequence ${4,12,15,35,60,70,\cdots}$ which is the sequence of natural numbers for which $n\varphi(n)+1$ is a perfect square. I note that these aren't all square free (many are divisible by $4$ and $198$ is divisible by $9$) so proving that weaker statement will need both conditions. – lulu Oct 18 '23 at 12:01
  • Though if you add the condition that $n$ be odd, you dramatically reduce the sequence. $105=3\times 5\times 7$ is the only example $<1000$ that isn't of your type. – lulu Oct 18 '23 at 12:32
  • Going for something weaker is interesting. But not sure what 105 is the only example of less than 1000. Can you elaborate? – JMP Oct 18 '23 at 14:30
  • I wrote the program hastily, so could certainly have got it wrong. What I believe I got was this: Look at the sequence of odd natural numbers $n$ for which $n\varphi(n)+1$ is a perfect square. Of course your "twin semi primes" are all in the sequence. $105$ is the smallest member of the sequence which isn;t of your form, and of course it is the product of the only prime triplets. – lulu Oct 18 '23 at 14:34
  • Ah, I see. So its the first instance you need to impose n+ 1 is square as well (for odd n).Could be useful. Thanks! – JMP Oct 18 '23 at 14:38
  • 2
    But on reflection I'd start by just proving that $n$ must be odd. If that's too hard, it bodes ill for anything harder. – lulu Oct 18 '23 at 14:38
  • $1309=7\times 11\times 13$ is the second example. Ah, but the third is $2775$ which is divisible by $5^2$, so the square free guess is not correct. – lulu Oct 18 '23 at 14:57
  • 1
    I tested the similar hypotheses that $n$ is the product of two primes with a gap of 2k $\iff n + k^2 $ and $n \phi (n) + k^2 $ are square. Although this holds true for the vast majority of $n$ there are exceptions. For example for k=2, there are 5 exceptions for n< 10: 140, 396,1932,8460,3057205260. This could suggest that more crunching is needed to find a counterexample in the case $k=1$, or that any bound arguments will have to be quite precise. – JMP Oct 19 '23 at 12:45
  • @lulu So, did you refute the "only if" - part ? – Peter Oct 20 '23 at 12:14
  • @Peter No. Didn't get very far. From small numbers, I had hopes that just the second condition, $n\varphi(n)+1=k^2$, had strong, provable implications...but was not able to prove anything and found counterexamples to some of my early guesses. – lulu Oct 20 '23 at 12:30
  • Maybe , it helps that $n\varphi(n)=\varphi(n^2)$ , not for the brute force search , but for a proof trial. – Peter Oct 20 '23 at 12:33
  • 2
    If $k$ is an integer with $2\le k\le 10^7$ and $n:=k^2-1$. Then , if $n\varphi(n)+1$ is a perfect square , then both $k-1$ and $k+1$ are prime. Therefore , a counterexample must exceed $10^{14}$. – Peter Oct 20 '23 at 12:52
  • Taking the difference of $n + 1 = x^2$ and $n \phi(n) + 1 = y^2$ gives $n (\phi(n) - 1 ) = (y-x)(y+x)$. If one can show that $x+y=n$ (or $x-y = \phi(n) -1$) I believe the result follows. – JMP Oct 20 '23 at 16:25
  • I dont know how but somehow the perfect squares etc lends itself to a play on the mobius function. – sku Oct 20 '23 at 22:39
  • In the case that one of $k-1$ and $k+1$ is prime , the conjecture is true upto $k=10^9$ ($n=10^{18}$). Maybe someone can prove that in this case both must be prime which would be a start for a possible proof. – Peter Oct 21 '23 at 06:22
  • 1
  • $n=0$ is an exception, but I suppose you take $\mathbb N\not\ni0$. (Note that $\phi(0)=2$, since $\mathbb Z\bmod0=\mathbb Z$ (by definition $x\equiv y\bmod0$ if and only if $x-y$ is a multiple of $0$), and the multiplicative group of $\mathbb Z$ is ${\pm1}$ which has size $2$.) – mr_e_man Oct 24 '23 at 18:27
  • Considering $n=(x+1)(x-1)$, if $x$ is even then $n$ is odd. If $x=2k-1$ is odd then $n=8\binom k2$ (where $\binom k2$ is a triangular number). – mr_e_man Oct 24 '23 at 19:43
  • @JMP - You're missing a $+1$ at the end of the $pqr$ stuff. – mr_e_man Oct 24 '23 at 20:15

2 Answers2

0

COMMENT.- (don't put neither upvote nor downvote, please. This is not an answer but an equivalent reformulation of the problem that seems to me could be less dificult to try maybe).

Let $n\in \mathbb N$. One has $$\phi(n)=\frac{Y(Y+2)}{X(X+2)};\space \space Y,X\in\mathbb N\text { if and only if }n=pq\space \text{ where p,q are twin numbers. }\qquad (*)$$ The assertion could be false but to find a counterexample involves great numbers.

The difficult part is "only if"; for the "if" one has $\phi(n)=p^2-1=\dfrac{(p+p^2)(p^2+p-2)}{p^2+2p}$ where $X=p$ and $Y=p^2+p-2$. Remark however that this implies that also $\phi(n)$ must be of the form $Z(Z+2)$. Could be this useful for a proof of the hard "only if", in case the problem is true?

Ataulfo
  • 32,657
0

PARTIAL ANSWER: We wish to characterize solutions to $n\phi(n)=y^2-1$, given that $n=x^2-1$.

Basics: $n\ne 1$ because $2$ is not a square. $n$ is not a prime because the only prime $1$ less than a square is $3$, and $3\phi(3)+1=7$, not a square. $n$ is not a perfect power of an integer (including prime integers) because the only perfect power $1$ less than a square is $8$ (Mihailescu's theorem), and $8\phi(8)+1=33$, not a square. So $n$ is a composite number with at least two different prime factors.

$\phi(n)<n \Rightarrow n\phi(n)<n^2-1$. Let $n\phi(n)=(n-k)^2-1$, where $k<n$. $n\phi(n)=(n-k-1)(n-k+1)=(n-(k-1))(n-(k+1))$. Without deciding primality ahead of time, let us name $p=x-1, q=x+1$ so that $pq=x^2-1=n$. We can see that $q-p=2$ and $\gcd(p,q)\le 2$. Similarly, $(k+1)-(k-1)=2$ and $\gcd((k-1),(k+1))\le 2$.

$$\phi(n)=\frac{(n-(k-1))(n-(k+1))}{n}=\frac{(pq-(k-1))(pq-(k+1))}{pq}\\ \phi(pq)=\frac{(pq-(k-1))}{p}\frac{(pq-(k+1))}{q}=\left (q-\frac{(k-1)}{p}\right)\left(p-\frac{(k+1)}{q}\right)$$ The condition $k=x$ renders $\frac{(k-1)}{p}=1$ and $\frac{(k+1)}{q}=1$, leading to $$\phi(pq)=(p-1)(q-1)$$ which occurs only if $p,q \in \mathbb P$. Since $q-p=2$, they are twin primes.

The remaining gap in the proof is whether $k^2-1<n^2$, which has two factors that differ by $2$, can have two factors (prime or not) that differ by $2$ other than the known factors of $n$, $(x-1),(x+1)$. With the limitation on the magnitude of $k$, I don't think this is possible, but I have not found a proof of that yet. For odd $n$, i.e. even $k,x$, $\gcd((x-1),(x+1))=\gcd((k-1),(k+1))=1$, finding such other factors seems virtually impossible, but impressions are not a proof.

  • Why would $k$ be equal to $x$? Also, $p,q$ need not be even, so you can’t state that $gcd(p,q)=2$! – Aphelli Nov 02 '23 at 21:58
  • @Aphelli Good catch on the gcd issue; I have corrected. As to why $k=x$, it is not forced, rather it is an observable condition that yields a solution. My further comments go to the difficulties in finding other conditions that also might yield solutions. – Keith Backman Nov 03 '23 at 14:58