A wire of resistance $ R $ is bent into a triangular pyramid as shown in the figure, with each segment having the same length. The resistance between points $ A $ and $ B $ is $ \frac{R}{n} $. The value of $ n $ is: