In elements of set {0,1,2,........23}
8 elements are of the form 3λ
8 elements are of the form 3λ + 1
8 elements are of the form 3λ - 1
Coefficient of x24 is 1 (not divisible by 3)

Coefficient of x22 is not multiple of 3
Coefficient of x21 is multiple of 3
Coefficient of x8 is not multiple of 3
Coefficient of x7 is multiple of 3
Now all coefficient of power of x less than 7 are multiple of 3
Coefficient of x24 , Coefficient of x22 ,......... Coefficient of x8 are not multiple of 3
Number of coefficient which are multiple of 3 are 24 9 = 15