多分できた

[Q(tan(2π/n):Q]=
φ(n) (n:odd)
φ(n/2)/2 (8|n)
φ(n/2) (otherwise)

自信はない。