Find all positive integers $n$ such that $6^n+1$ it has all the same digits when it is writen in decimal representation.
1. **Initial Observation:**
   We need to find all positive integers \( n \) such that \( 6^n + 1 \) has all the same digits when written in decimal representation. 

2. **Modulo Analysis:**
   Since \( 6^n + 1 \) must have all the same digits, let's denote this common digit by \( d \). Therefore, \( 6^n + 1 \equiv d \mod 10 \). 
   
   Notice that \( 6^n \mod 10 \) cycles every 4 terms:
   \[
   \begin{align*}
   6^1 &\equiv 6 \mod 10, \\
   6^2 &\equiv 36 \equiv 6 \mod 10, \\
   6^3 &\equiv 216 \equiv 6 \mod 10, \\
   6^4 &\equiv 1296 \equiv 6 \mod 10.
   \end{align*}
   \]
   Thus, \( 6^n \equiv 6 \mod 10 \) for all \( n \geq 1 \). Therefore,
   \[
   6^n + 1 \equiv 6 + 1 \equiv 7 \mod 10.
   \]
   This implies that all digits of \( 6^n + 1 \) must be 7.

3. **Form of the Number:**
   If \( 6^n + 1 \) consists of all 7's, it can be written as:
   \[
   6^n + 1 = 7 \cdot \frac{10^k - 1}{9}
   \]
   for some integer \( k \). Simplifying, we get:
   \[
   6^n + 1 = \frac{7 \cdot (10^k - 1)}{9}.
   \]

4. **Algebraic Manipulation:**
   Rearranging the equation, we have:
   \[
   9 \cdot (6^n + 1) = 7 \cdot (10^k - 1).
   \]
   Expanding and simplifying:
   \[
   9 \cdot 6^n + 9 = 7 \cdot 10^k - 7.
   \]
   \[
   9 \cdot 6^n + 16 = 7 \cdot 10^k.
   \]

5. **Checking Small Values of \( n \):**
   Let's check small values of \( n \) to see if they satisfy the equation:
   - For \( n = 1 \):
     \[
     6^1 + 1 = 7,
     \]
     which is a valid solution since 7 has all the same digits.
   - For \( n = 2 \):
     \[
     6^2 + 1 = 36 + 1 = 37,
     \]
     which does not have all the same digits.
   - For \( n = 3 \):
     \[
     6^3 + 1 = 216 + 1 = 217,
     \]
     which does not have all the same digits.
   - For \( n = 4 \):
     \[
     6^4 + 1 = 1296 + 1 = 1297,
     \]
     which does not have all the same digits.

6. **General Case Analysis:**
   For \( n > 4 \), we need to analyze the factors of both sides of the equation:
   \[
   9 \cdot 6^n + 16 = 7 \cdot 10^k.
   \]
   Notice that the left-hand side (LHS) always has a factor of \( 16 \) and no higher power of \( 2 \). The right-hand side (RHS) must have the same property, hence \( k = 4 \) which yields \( n = 5 \) as the only other solution.

7. **Verification for \( n = 5 \):**
   \[
   6^5 + 1 = 7776 + 1 = 7777,
   \]
   which has all the same digits.

Conclusion:
The only positive integer solutions for \( n \) such that \( 6^n + 1 \) has all the same digits are \( n = 1 \) and \( n = 5 \).

The final answer is \( \boxed{n = 1 \text{ and } n = 5} \).