4. A positive integer n is given.Find the smallest $k$ such that we can fill a $3*k$ gird with non-negative integers 
such that:
$\newline$ $i$) Sum of the numbers in  each column is $n$.
 $ii$) Each of the numbers $0,1,\dots,n$ appears at least once in each row.
To find the smallest \( k \) such that we can fill a \( 3 \times k \) grid with non-negative integers satisfying the given conditions, we need to analyze both the sum constraints and the appearance constraints.

1. **Sum Constraint Analysis:**
   - The sum of the numbers in each column must be \( n \).
   - Let \( S \) be the total sum of all numbers in the grid. Since there are \( k \) columns, the total sum \( S \) is given by:
     \[
     S = kn
     \]
   - Each row must contain the numbers \( 0, 1, \ldots, n \) at least once. The sum of these numbers is:
     \[
     0 + 1 + 2 + \cdots + n = \frac{n(n+1)}{2}
     \]
   - Since there are 3 rows, the minimum total sum \( S \) must be:
     \[
     S \ge 3 \times \frac{n(n+1)}{2} = \frac{3n(n+1)}{2}
     \]
   - Equating the two expressions for \( S \), we get:
     \[
     kn \ge \frac{3n(n+1)}{2}
     \]
   - Solving for \( k \), we find:
     \[
     k \ge \frac{3(n+1)}{2}
     \]
   - Since \( k \) must be an integer, we take the ceiling of this value:
     \[
     k \ge \left\lceil \frac{3(n+1)}{2} \right\rceil
     \]

2. **Construction:**
   - We need to construct a \( 3 \times k \) grid that satisfies the conditions for the smallest \( k \).

   **Case 1: \( n \) is odd**
   - For \( n \) odd, we can use the columns of the form \( (0, a, n-a) \), \( (n-a, 0, a) \), and \( (a, n-a, 0) \) for \( 0 \le a \le \frac{n-1}{2} \).
   - This construction ensures that each number from \( 0 \) to \( n \) appears in each row.

   **Case 2: \( n \) is even**
   - For \( n \) even, we use the same columns as in the odd case for \( 0 \le a \le \frac{n}{2} - 1 \).
   - Additionally, we include the columns \( (0, \frac{n}{2}, \frac{n}{2}) \) and \( (\frac{n}{2}, \frac{n}{2}, 0) \).

   These constructions ensure that each number from \( 0 \) to \( n \) appears in each row and the sum of each column is \( n \).

The final answer is \( \boxed{ \left\lceil \frac{3(n+1)}{2} \right\rceil } \).