|
|
A208533
|
|
Number of n-bead necklaces of n colors not allowing reversal, with no adjacent beads having the same color.
|
|
2
|
|
|
1, 1, 2, 24, 204, 2635, 39990, 720916, 14913192, 348684381, 9090909090, 261535848376, 8230246567620, 281241174889207, 10371206370593250, 410525522392242720, 17361641481138401520, 781282469565908953017, 37275544492386193492506, 1879498672877604463254424
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (1/n) * Sum_{d | n} totient(n/d) * ((n-1)*(-1)^d + (n-1)^d) for n > 1. - Andrew Howroyd, Mar 12 2017
|
|
EXAMPLE
|
All solutions for n=4:
..2....1....1....1....1....1....2....1....1....3....1....1....1....2....1....1
..3....2....4....4....4....3....4....4....3....4....3....4....2....3....2....2
..2....4....2....3....2....2....3....1....1....3....4....3....1....4....3....1
..4....2....4....2....3....3....4....4....3....4....2....4....4....3....2....2
..
..1....1....2....1....2....1....1....1
..2....3....3....3....4....2....2....3
..1....4....2....1....2....4....3....2
..3....3....3....4....4....3....4....4
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) a(n) = if (n==1, 1, (1/n) * sumdiv(n, d, eulerphi(n/d) * ((n-1)*(-1)^d + (n-1)^d))); \\ Michel Marcus, Nov 01 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|