By way of contradiction, suppose such an n exists. Using the formula φ(n) = n ∏(q prime, q|n) (1 - 1/q), we deduce
(*) p = n/2 ∏(q prime, q|n) (1 - 1/q).
If n is a power of 2, say, n = 2^k, then φ(2^k) = 2^k(1 - 1/2) = 2^(k-1) ≠ 2p. So n has at least one odd divisor. For each odd divisor q of n, the product formula for (*) shows that (q - 1)/2 = q/2 * (1 - 1/q) is a factor of p. So (q - 1)/2 = 1 or p. If (q - 1)/2 = p, then q = 2p + 1, contradicting the assumption that 2p + 1 is not a prime. So (q - 1)/2 = 1, i.e., q = 3. Therefore n is of the form 3 * 2^k for some integer k ≥ 0. Since gcd(3, 2^k) = 1,
φ(n) = φ(3)φ(2^k) = 2 * 2^(k-1) = 2^k,
which is not divisible by the odd prime p. This gives a contradiction.
Answers & Comments
Verified answer
By way of contradiction, suppose such an n exists. Using the formula φ(n) = n ∏(q prime, q|n) (1 - 1/q), we deduce
(*) p = n/2 ∏(q prime, q|n) (1 - 1/q).
If n is a power of 2, say, n = 2^k, then φ(2^k) = 2^k(1 - 1/2) = 2^(k-1) ≠ 2p. So n has at least one odd divisor. For each odd divisor q of n, the product formula for (*) shows that (q - 1)/2 = q/2 * (1 - 1/q) is a factor of p. So (q - 1)/2 = 1 or p. If (q - 1)/2 = p, then q = 2p + 1, contradicting the assumption that 2p + 1 is not a prime. So (q - 1)/2 = 1, i.e., q = 3. Therefore n is of the form 3 * 2^k for some integer k ≥ 0. Since gcd(3, 2^k) = 1,
φ(n) = φ(3)φ(2^k) = 2 * 2^(k-1) = 2^k,
which is not divisible by the odd prime p. This gives a contradiction.