OFFSET
1,3
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
EXAMPLE
Case n=4: there are the following 10 necklaces:
1212,
1213, 1232, 1323,
1234, 1243, 1324, 1342, 1423, 1432.
PROG
(PARI) \\ here U(n, k) is A208535(n, k) for n > 1.
U(n, k)={sumdiv(n, d, eulerphi(n/d)*(k-1)^d)/n - if(n%2, k-1)}
a(n)={if(n<1, n==0, sum(j=1, n, U(n, j)*sum(k=j, n, (-1)^(k-j)*binomial(k, j))))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Andrew Howroyd, Dec 20 2019
STATUS
approved