Suppose is not bipartite. A graph is bipartite if and only if it has no odd cycle, so choose a shortest odd cycle and write its length as . Since there are no triangles, .
The cycle has no chord. A chord would divide it into two shorter cycles whose lengths sum to , an odd number. One of those shorter cycles would therefore be odd, contradicting the choice of .
Every vertex outside has at most two neighbors on . To prove this, suppose an outside vertex has at least three such neighbors. The consecutive neighbors divide into arcs, each of length at least two; adjacent neighbors would form a triangle with . The arc lengths sum to the odd number , so some arc has odd length . There are at least two other arcs, each of length at least two, hence . This odd arc and the two edges from its endpoints to form an odd cycle of length , again a contradiction.
Each vertex on has exactly two neighbors on , and every other vertex has at most two. Counting incidences with the vertices of gives
Therefore
contradicting the hypothesis. Thus is bipartite.
For sharpness, take five disjoint vertex sets , each containing vertices. Join every vertex of to every vertex of , with indices modulo five, and add no other edges. Each vertex has exactly neighbors. No triangle is possible, since the five-cycle of parts has no three pairwise adjacent parts. Choosing one vertex from each part gives a five-cycle, so the graph is not bipartite.
This has vertices and minimum degree , proving sharpness.
Source: Extremal Combinatorics, Po-Shen Loh, section 3, problem 2. This is the triangle-free case of the Andrasfai-Erdos-Sos theorem.