OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..200
Frank Ruskey, Necklaces, Lyndon words, De Bruijn sequences, etc.
F. Ruskey, Necklaces, Lyndon words, De Bruijn sequences, etc. [Cached copy, with permission, pdf format only]
Eric Weisstein's world of Mathematics, Necklaces
FORMULA
a(n) = (1/n) * Sum_{d|n} phi(n/d) * A005651(d) for n > 0. - Andrew Howroyd, Sep 25 2017
See Mathematica line.
a(n) ~ c * (n-1)!, where c = Product_{k>=2} 1/(1-1/k!) = A247551 = 2.52947747207915264818011615... . - Vaclav Kotesovec, Aug 27 2015
MATHEMATICA
neck[li:{__Integer}] := Module[{n, d}, n=Plus@@li; d=n-First[li]; Fold[ #1+(EulerPhi[ #2]*(n/#2)!)/Times@@((li/#2)!)&, 0, Divisors[GCD@@li]]/n]; Table[ Plus@@(neck /@ IntegerPartitions[n]), {n, 24}]
PROG
(PARI) a(n)={if(n==0, 1, my(p=prod(k=1, n, 1/(1-x^k/k!) + O(x*x^n))); sumdiv(n, d, eulerphi(n/d)*d!*polcoeff(p, d))/n)} \\ Andrew Howroyd, Dec 20 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Wouter Meeussen, Aug 06 2002
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Aug 23 2015
Name changed by Andrew Howroyd, Sep 25 2017
STATUS
approved