Euler's totient function and limits Suppose we have an infinite set $S$ of positive composite numbers such that the prime factors $p$ of $n \in S$ have the property that $p \to \infty$ as $n \to \infty$. What is 
$$
\lim_{\substack{n \to \infty \\ n \in S}} n - \phi(n)?
$$
Is it $0$? I say this in light of the fact that $\phi(n)/n \to 1$ as $n \to \infty$ for $n \in S$ since
$$
\dfrac{\phi(n)}{n} = \prod_{p \mid n} \left( 1 - \dfrac{1}{p}  \right).
$$
How about the case when $S$ consists of infinitely many composite Mersenne numbers (if such a set exists) whose number of prime factors is a constant? Can we say anything special here?
 A: It's not $0$ and may not exist in general. Take $S$ to be the set of primes themselves, then $p-\phi(p)=1$ for all $p$. And $\frac{f(n)}{n}\to1$ does not imply $f(n)-n\to0$, take $f(n)=n+\ln n$.
A: If $S$ is the set of primes, then for any $p \in S$, we have $p - \phi(p) = 1$, and so your limit is 1 in this case.
If $S = \{ s_n \}$, where $s_n = p_n p_{n+1}$ and $p_n$ denotes the $n$th prime, then 
$$
  s_n - \phi(s_n) = p_np_{n+1} - (p_n-1)(p_{n+1}-1) = p_n + p_{n+1} - 1
$$
approaches $\infty$ as $n \to \infty$.
Thus the limit may not exist, even if $S$ contains only composite numbers.
A: For any $n,m$ we have $nm-\phi(nm)\ge n(m-\phi(m)).$ Thus for $n$ composite, $n-\phi(n)$ must be greater than or equal to $s-\phi(s)$ where $s$ is the largest semiprime dividing $n$. But since we know that $pq-\phi(pq)=p+q-1$ if $p\ne q$ and $=p$ if $p=q$, we know that $n-\phi(n)$ for $n\in S$ will:


*

*diverge to $\infty$ if $S$ contains only finitely many primes

*converges to $1$ if $S$ contains only finitely many composites

*oscillates between $1$ and arbitrarily large numbers otherwise


In particular, since $2^d-1\mid 2^n-1$ whenever $d\mid n$, there are infinitely many composite Mersenne numbers so $n-\phi(n)$ certainly doesn't converge, but whether it diverges to $\infty$ or oscillates depends on whether or not there are infinitely many Mersenne primes, which is an open problem.
The limit points of the values $\phi(n)/n$ takes are $\prod_{p\in A}(1-p^{-1})$ over all sets $A$ of primes. It contains $0$ and $1$ and many things in between, so $\phi(n)/n$ can oscillate or converge in some interesting and mildly complicated ways. Even if $S$ contains only composites, with only finitely many divisible by any given prime (so all prime factors $\to\infty$), we can still arrange for $\phi(n)/n\to0$ which is the other extreme from $\to 1$ as you suggest. Indeed, consider $S=\{p^2:p~\rm prime\}$.
