A106367
Number of necklaces with n beads of 5 colors, no 2 adjacent beads the same color.
Original entry on oeis.org
5, 10, 20, 70, 204, 700, 2340, 8230, 29140, 104968, 381300, 1398500, 5162220, 19175140, 71582940, 268439590, 1010580540, 3817763740, 14467258260, 54975633976, 209430787820, 799645010860, 3059510616420, 11728124734500
Offset: 1
-
a[n_] := If[n==1, 5, Sum[EulerPhi[n/d]*(4*(-1)^d+4^d), {d, Divisors[n]}]/n ];
Array[a, 35] (* Jean-François Alcover, Jul 06 2018, after Andrew Howroyd *)
-
a(n) = if(n==1, 5, sumdiv(n, d, eulerphi(n/d)*(4*(-1)^d + 4^d))/n); \\ Andrew Howroyd, Oct 14 2017
A208533
Number of n-bead necklaces of n colors not allowing reversal, with no adjacent beads having the same color.
Original entry on oeis.org
1, 1, 2, 24, 204, 2635, 39990, 720916, 14913192, 348684381, 9090909090, 261535848376, 8230246567620, 281241174889207, 10371206370593250, 410525522392242720, 17361641481138401520, 781282469565908953017, 37275544492386193492506, 1879498672877604463254424
Offset: 1
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
-
a[1] = 1; a[n_] = (1/n)*DivisorSum[n, EulerPhi[n/#]*((n-1)*(-1)^# + (n-1)^#)& ]; Array[a, 20] (* Jean-François Alcover, Nov 01 2017, after Andrew Howroyd *)
-
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
A330620
Number of length n necklaces with entries covering an initial interval of positive integers and no adjacent entries equal.
Original entry on oeis.org
0, 1, 2, 10, 54, 392, 3378, 34120, 393738, 5112406, 73756026, 1170482186, 20263782630, 380047964920, 7676106365966, 166114208828980, 3834434324386350, 94042629535109500, 2442147034719168714, 66942194906112161302, 1931543452345335094678, 58519191359163454708564
Offset: 1
Case n=4: there are the following 10 necklaces:
1212,
1213, 1232, 1323,
1234, 1243, 1324, 1342, 1423, 1432.
-
\\ 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))))}
A208534
Number of n-bead necklaces of 7 colors not allowing reversal, with no adjacent beads having the same color.
Original entry on oeis.org
7, 21, 70, 336, 1554, 7826, 39990, 210126, 1119790, 6047412, 32981550, 181402676, 1004668770, 5597460306, 31345666730, 176319474366, 995685849690, 5642220380006, 32071565263710, 182807925027504
Offset: 1
Some solutions for n=4
..1....1....2....3....3....1....1....2....1....3....1....3....4....1....1....1
..3....5....3....5....5....6....3....7....5....7....4....7....7....2....3....5
..1....7....4....6....3....1....4....4....7....6....3....5....5....4....6....4
..5....2....3....7....7....6....5....3....6....4....2....4....6....7....2....2