Connor brought a large container of nuts to school to share with his friends on National Nut Day. The ratio of macadamia nuts to walnuts to peanuts was 2:3:8. If there were a total of thirty-nine nuts, how many peanuts were in the container?

2+3+8 = 13

39=3*13, so 2:3:8 = 6:9:24