login
A208538
Number of n-bead necklaces of n colors allowing reversal, with no adjacent beads having the same color.
2
1, 1, 1, 21, 102, 1505, 19995, 365260, 7456596, 174489813, 4545454545, 130773238871, 4115123283810, 140620807064413, 5185603185296625, 205262771447683860, 8680820740569200760, 390641235316599920745, 18637772246193096746253, 939749336469457562916217
OFFSET
1,4
LINKS
FORMULA
a(2n+1) = A208533(2n+1)/2 for n > 0, a(2n) = (A208533(2n) + n*(2n-1)^n)/2. - Andrew Howroyd, Mar 12 2017
EXAMPLE
All solutions for n=4:
..1....1....1....1....2....1....1....1....2....1....1....3....2....2....1....1
..2....4....3....2....3....2....3....3....4....3....2....4....3....4....2....2
..4....2....2....3....2....4....1....4....2....2....1....3....2....3....1....1
..2....4....4....2....3....3....3....3....4....3....3....4....4....4....2....4
..
..1....1....2....1....1
..3....4....3....2....4
..1....3....4....3....1
..4....4....3....4....4
MATHEMATICA
T[n_, k_] := If[n == 1, k, (DivisorSum[n, EulerPhi[n/#]*(k - 1)^# &]/n + If[OddQ[n], 1 - k, k*(k - 1)^(n/2)/2])/2]; a[n_] = T[n, n]; Array[a, 20] (* Jean-François Alcover, Nov 01 2017, after Andrew Howroyd *)
CROSSREFS
Diagonal of A208544.
Sequence in context: A044272 A044653 A076454 * A303681 A304132 A304220
KEYWORD
nonn
AUTHOR
R. H. Hardin, Feb 27 2012
EXTENSIONS
a(12)-a(20) from Andrew Howroyd, Mar 12 2017
STATUS
approved