In a summer school, there are $n>4$ students. It is known that, among these students,
i. If two ones are friends, then they don't have any common friends.
ii If two ones are not friends, then they have exactly two common friends.
1. Prove that $8n-7$ must be a perfect square.
2. Determine the smallest possible value of $n$.
1. Consider the graph \( G \) where each vertex represents a student and an edge between two vertices represents a friendship. Let \( A \) be an arbitrary vertex in \( G \). Let \( F \) be the set of friends of \( A \) and \( N \) be the set of non-friends of \( A \).

   - By condition (i), the induced subgraph on \( F \) is empty, meaning no two vertices in \( F \) are connected.
   - By condition (ii), any two vertices in \( F \) have exactly one common friend in \( N \). Also, every vertex in \( N \) is connected to exactly 2 vertices in \( F \).

2. Let \( |F| = k \). Each pair of vertices in \( F \) has exactly one common friend in \( N \). The number of pairs of vertices in \( F \) is \( \binom{k}{2} = \frac{k(k-1)}{2} \). Since each pair has exactly one common friend in \( N \), there are \( \frac{k(k-1)}{2} \) vertices in \( N \).

3. Each vertex in \( N \) is connected to exactly 2 vertices in \( F \). Therefore, there is a bijection between the vertices in \( N \) and the pairs of vertices in \( F \). Hence, the total number of vertices in \( G \) is:
   \[
   n = |F| + |N| + 1 = k + \frac{k(k-1)}{2} + 1
   \]

4. Simplify the equation:
   \[
   n = k + \frac{k^2 - k}{2} + 1 = \frac{k^2 + k}{2} + 1
   \]
   \[
   2n = k^2 + k + 2
   \]
   \[
   k^2 + k + 2 - 2n = 0
   \]

5. This is a quadratic equation in \( k \). For \( k \) to be an integer, the discriminant of this quadratic equation must be a perfect square. The discriminant \( \Delta \) is given by:
   \[
   \Delta = b^2 - 4ac = 1^2 - 4 \cdot 1 \cdot (2 - 2n) = 1 + 8n - 8 = 8n - 7
   \]

6. Therefore, \( 8n - 7 \) must be a perfect square.

7. To find the smallest possible value of \( n \), let \( 8n - 7 = m^2 \) for some integer \( m \). Then:
   \[
   8n = m^2 + 7
   \]
   \[
   n = \frac{m^2 + 7}{8}
   \]

8. \( n \) must be an integer, so \( m^2 + 7 \) must be divisible by 8. Testing small values of \( m \):
   - \( m = 1 \): \( 1^2 + 7 = 8 \), \( n = \frac{8}{8} = 1 \) (not valid since \( n > 4 \))
   - \( m = 3 \): \( 3^2 + 7 = 16 \), \( n = \frac{16}{8} = 2 \) (not valid since \( n > 4 \))
   - \( m = 5 \): \( 5^2 + 7 = 32 \), \( n = \frac{32}{8} = 4 \) (not valid since \( n > 4 \))
   - \( m = 7 \): \( 7^2 + 7 = 56 \), \( n = \frac{56}{8} = 7 \) (valid)

Therefore, the smallest possible value of \( n \) is 7.

The final answer is \( \boxed{ n_{\min} = 7 } \)