Find all positive integers $n$, such that $n$ is a perfect number and $\varphi (n)$ is power of $2$.

[i]Note:a positive integer  $n$, is called perfect if the sum of all its positive divisors is equal to $2n$.[/i]
1. **Assume \( n \) is a perfect number and \(\varphi(n)\) is a power of 2.**

2. **Case 1: \( n \) is even.**
   - By the Euclid-Euler Theorem, an even perfect number \( n \) is of the form \( n = 2^{p-1}(2^p - 1) \), where \( 2^p - 1 \) is a Mersenne prime.
   - The Euler's totient function for \( n \) is given by:
     \[
     \varphi(n) = \varphi(2^{p-1}) \cdot \varphi(2^p - 1) = 2^{p-2} \cdot (2^p - 2)
     \]
   - Since \(\varphi(n)\) is a power of 2, we set:
     \[
     2^{p-2} \cdot (2^p - 2) = 2^u
     \]
     for some integer \( u \).
   - Simplifying, we get:
     \[
     2^{p-2} \cdot 2(2^{p-1} - 1) = 2^{p-1} \cdot (2^{p-1} - 1) = 2^u
     \]
   - This implies:
     \[
     2^{p-1} - 1 = 2^{u - (p-1)}
     \]
   - For \( u = 1 \):
     \[
     2^{p-1} - 1 = 2^0 = 1 \implies 2^{p-1} = 2 \implies p = 2
     \]
     - Substituting \( p = 2 \) into the form of \( n \):
       \[
       n = 2^{2-1}(2^2 - 1) = 2 \cdot 3 = 6
       \]
   - For \( u \geq 2 \):
     \[
     2^{p-1} - 1 = 2^v \quad \text{for some integer } v
     \]
     - This equation does not hold for any \( p \geq 3 \) because \( 2^{p-1} - 1 \) is odd and \( 2^v \) is even for \( v \geq 1 \).

3. **Case 2: \( n \) is odd.**
   - If \( n \) is odd and perfect, it must be square-free and of the form \( n = p_1 p_2 \cdots p_k \) where \( p_i \) are distinct primes.
   - The sum of divisors function \(\sigma(n)\) for odd \( n \) is:
     \[
     \sigma(n) = (1 + p_1)(1 + p_2) \cdots (1 + p_k)
     \]
   - Since \( n \) is perfect:
     \[
     \sigma(n) = 2n
     \]
   - Comparing both sides:
     \[
     (1 + p_1)(1 + p_2) \cdots (1 + p_k) = 2p_1 p_2 \cdots p_k
     \]
   - Taking the 2-adic valuation \( v_2 \) on both sides:
     \[
     v_2((1 + p_1)(1 + p_2) \cdots (1 + p_k)) = v_2(2p_1 p_2 \cdots p_k) = 1
     \]
   - Since \( p_i \) are odd primes, \( 1 + p_i \) is even, and \( v_2(1 + p_i) = 1 \). Therefore, \( k = 1 \), meaning \( n \) is a prime.
   - If \( n \) is a prime, then:
     \[
     \sigma(n) = n + 1
     \]
     - This does not satisfy the condition \( \sigma(n) = 2n \).

4. **Conclusion:**
   - The only solution for \( n \) being a perfect number and \(\varphi(n)\) being a power of 2 is \( n = 6 \).

The final answer is \( \boxed{ n = 6 } \).