%I #4 Jan 25 2015 10:17:35
%S 5040,161280,3024000,43545600,534330720,5891719680,60227481600,
%T 582295633920,5397245411040,48421936442880,423440785541760,
%U 3628271603174400,30584600246448864,254421149466401280,2093705950217414400,17078070713147136000,138294714025711281360
%N Number of primitive (=aperiodic) n-bead necklaces with colored beads of exactly 8 different colors.
%H Alois P. Heinz, <a href="/A254080/b254080.txt">Table of n, a(n) for n = 8..1000</a>
%p with(numtheory):
%p b:= proc(n, k) option remember; `if`(n=0, 1,
%p add(mobius(n/d)*k^d, d=divisors(n))/n)
%p end:
%p a:= n-> add(b(n, 8-j)*binomial(8, j)*(-1)^j, j=0..8):
%p seq(a(n), n=8..30);
%Y Column k=8 of A254040.
%K nonn
%O 8,1
%A _Alois P. Heinz_, Jan 25 2015