OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..80
FORMULA
a(n) = Sum_{d|3} phi(3/d)*(n*d)!/(d!^n*n*3) if n>0 and a(0) = 1.
For n > 0, a(n) = (3*n)!/(3*n*6^n) + 2*(n-1)!/3. - Vaclav Kotesovec, Aug 23 2015
EXAMPLE
a(0) = 1: the empty necklace.
a(1) = 1: {000}.
a(2) = 4: {000111, 001011, 010011, 010101}.
MAPLE
with(numtheory);
a:= n-> `if`(n=0, 1, add(phi(3/d) *(n*d)!/(d!^n *3*n), d={1, 3})):
seq(a(n), n=0..20);
MATHEMATICA
Flatten[{1, Table[(3*n)!/(3*n*6^n) + 2*(n-1)!/3, {n, 1, 20}]}] (* Vaclav Kotesovec, Aug 23 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Feb 24 2012
STATUS
approved