This morning I was thinking in equations involving the Euler's totient function $\varphi(n)$ and the sequence of twin primes (see if you want this MathWorld). I am saying similar questions than statements or conjectures that were in the literature. Since my questions are miscellaneous and I have done few experiments, I preferred to group these questions in the same post.
I was inspired in the sequence A037171 from The On-Line Encyclopedia of Integer Sequences to ask about the first question.
I don't know if next sequence was in the literature, and how to prove that has finitely many terms. My sequence is defined as the integers $n\geq 1$ that satisfy $$\pi_2(n^2)=\varphi(n),\tag{1}$$ where $\pi_2(x)$ is the twin prime counting function. Our sequence starts as $3,5,7,11,13$, and since I know only these terms I cann't know if our sequence is in the OEIS. Also I tried to combine formulas from the literature to prove that our sequence is finite, but the factor $k^2$ the factor spoiled my proof from the strategy $\pi_2(x)<\pi(x)$. Thus my main question here is the next.
Question 1. Do you know this sequence $(1)$ from the OEIS or a different official source? Many thanks for yor attention.
Also this morning I was exploring the sequence A001359 from the OEIS, then I known the first comment by McCranie (2001) and the subsequent comment. My first idea was to generalize with next conejcture.
Conjecture . A) If $n\geq 1$ satisfies $$\varphi((n+2)^2)=(n+2)\cdot(\sigma(n^2)-n^2)\tag{2}$$ then $n$ and $n+2$ are a pair of twin primes (that is $n$ and $n+2$ are primes).
B) With $\sigma(l)=\sum_{d\mid l}d$ we denote here the sum of divisors function. If an integer $n\geq 1$ satisfies, for a fixed integer $a\geq 2$, the equation $$n\varphi((n+2)^a)=(n-1)\sigma(n^a)+n^2\left(\sum_{k=1}^{a-1}\binom{a-1}{k}n^{a-1-k}\cdot 2^k\right)+(n+1)^2,\tag{3}$$ then $n$ and $n+2$ are primes, that is, $(n,n+2)$ is a pair of twin primes.$\square$
I don't know if there exists a more elegant generalization of McCranie's conjecture. To me it is difficult even to prove the implication that I omitted, and I've no intuition if there are integers $m$ satisfying $(3)$ but also $m\notin\text{A001359}$ for some fixed integer $a\geq 2$.
Question 2. Can you tabulate counterexamples $(m,a)$ of Conjecture B for the first (for each fixed) integers $a\geq 2$? That I am asking is if you can find counterexamples for the first integers $a\geq 2$, say us integers $m\geq 3$ satisfying
$$m\varphi((m+2)^a)=(m-1)\sigma(m^a)+m^2\left(\sum_{k=1}^{a-1}\binom{a-1}{k}m^{a-1-k}\cdot 2^k\right)+(m+1)^2$$ and also $m\notin\text{A001359}$. Many thanks.
Here is a proof that $$\varphi((n+2)^2)=(n+2)\cdot(\sigma(n^2)-n^2)$$ if and only if $n$ and $n+2$ are both primes.
Suppose $n+2$ is prime.
Then $$\varphi((n+2)^2) = (n+2)^2\left(1-\frac{1}{n+2} \right)=n^2+3n+2.$$
For any $n$, $$(n+2)^2(\sigma(n^2)-n^2) \ge (n+2)^2(n+1) = n^2+3n+2$$ with equality only if $n$ is prime. Thus, the equality is established when $n$ and $n+2$ are prime.
Now, suppose $n+2$ is not prime. Then $$\varphi((n+2)^2) = (n+2)^2 \prod_{p|n+2} \left( 1-\frac{1}{p} \right) \le (n+2)^2 \left( 1 - \frac{2}{n+2}\right) = n^2+2n.$$
Since $n^2+2n<n^2+3n+2$ for all $n>0$, the equality fails to hold if $n$ and $n+2$ are not both prime.