%I #39 Sep 04 2018 03:34:46
%S 1,2,3,7,12,42,123,503,2008,8720,38365,173609,792828,3662924,17034381,
%T 79703081,374624254,1767883444,8370666417,39751072847,189262621864,
%U 903220058756,4319518316899,20697040198889,99343899144822,477609477924308,2299585449279713
%N Number of n-bead necklace structures using a maximum of five different colored beads.
%C Turning over the necklace is not allowed. Colors may be permuted without changing the necklace structure.
%D M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]
%H Vincenzo Librandi, <a href="/A056293/b056293.txt">Table of n, a(n) for n = 1..500</a>
%H E. N. Gilbert and J. Riordan, <a href="http://projecteuclid.org/euclid.ijm/1255631587">Symmetry types of periodic sequences</a>, Illinois J. Math., 5 (1961), 657-665.
%H N. J. A. Sloane, <a href="/A000013/a000013.txt">Maple code for this and related sequences</a>
%F Use de Bruijn's generalization of Polya's enumeration theorem as discussed in reference.
%F From _Robert A. Russell_, May 29 2018: (Start)
%F a(n) = (1/n) * Sum_{d|n} phi(d) * ([d==0 mod 60] * (5*S2(n/d + 4, 5) - 50*S2(n/d + 3, 5) + 175*S2(n/d + 2, 5) - 250*S2(n/d + 1, 5) + 120*S2(n/d, 5)) + [d==30 mod 60] * (4*S2(n/d+4,5) - 41*S2(n/d+3,5) + 149*S2(n/d+2,5) - 226*S2(n/d + 1, 5) + 120*S2(n/d, 5)) + [d==20 mod 60 | d==40 mod 60] * (4*S2(n/d + 4, 5) - 42*S2(n/d + 3, 5) + 156*S2(n/d + 2, 5) - 238*S2(n/d + 1, 5) + 120*S2(n/d, 5)) + [d==15 mod 60 | d==45 mod 60] * (3*S2(n/d + 4, 5) - 33*S2(n/d + 3, 5) + 129*S2(n/d + 2, 5) - 210*S2(n/d + 1, 5) + 120*S2(n/d, 5)) + [d mod 60 in {12,24,36,48}] * (4*S2(n/d + 4, 5) - 40*S2(n/d + 3, 5) + 140*S2(n/d + 2, 5) - 200*S2(n/d+1, 5) + 96*S2(n/d, 5)) + [d=10 mod 60 | d==50 mod 60] * (3*S2(n/d + 4, 5) - 33*S2(n/d + 3, 5) + 130*S2(n/d + 2, 5) - 214*S2(n/d + 1, 5) + 120*S2(n/d, 5)) + [d mod 60 in {6,18,42,54}] * (3*S2(n/d + 4, 5) - 31*S2(n/d + 3, 5) + 114*S2(n/d + 2, 5) - 176*S2(n/d + 1, 5) + 96*S2(n/d, 5)) + [d mod 60 in {5,25,35,55}] * (2*S2(n/d + 4, 5) - 23*S2(n/d + 3, 5) + 95*S2(n/d + 2, 5) - 165*S2(n/d + 1, 5) + 100*S2(n/d, 5)) + [d mod 60 in {4,8,16,28,32,44,52,56}] * (3*S2(n/d + 4, 5) - 32*S2(n/d + 3, 5) + 121*S2(n/d + 2, 5) - 188*S2(n/d + 1, 5) + 96*S2(n/d, 5)) + [d mod 60 in {3,9,21,27,33,39,51,57}] * (2*S2(n/d + 4, 5) - 23*S2(n/d + 3, 5) + 94*S2(n/d + 2, 5) - 160*S2(n/d + 1, 5) + 96*S2(n/d, 5)) + [d mod 60 in {2,14,22,26,34,38,46,58}] * (2*S2(n/d + 4, 5) - 23*S2(n/d + 3, 5) + 95*S2(n/d + 2, 5) - 164*S2(n/d + 1, 5) + 96*S2(n/d, 5)) + [d mod 60 in {1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59}] * (S2[n/d + 4, 5) - 13*S2(n/d + 3, 5) + 60*S2(n/d + 2, 5) - 115*S2(n/d + 1, 5) + 76*S2(n/d, 5))), where S2(n,k) is the Stirling subset number, A008277.
%F G.f.: 1 - Sum_{d>0} (phi(d) / d) * ([d==0 mod 60] * log(1-5x^d) + [d==30 mod 60] * (3*log(1-5x^d) + log(1-x^d)) / 4 + [d==20 mod 60 | d==40 mod 60] * (2*log(1-5x^d) + log(1-2x^d)) / 3 + [d==15 mod 60 | d==45 mod 60] * (3*log(1-5x^d) + 2*log(1-3x^d) + 3*log(1-x^d)) / 8 + [d mod 60 in {12,24,36,48}] * 4*log(1-5x^d) / 5 + [d=10 mod 60 | d==50 mod 60] * (5*log(1-5x^d) + 4*log(1-2x^d) + 3*log(1-x^d)) / 12 + [d mod 60 in {6,18,42,54}] * (11*log(1-5x^d) + 5*log(1-x^d)) / 20 + [d mod 60 in {5,25,35,55}] * (5*log(1-5x^d) + 2*log(1-3x^d) + 4*log(1-2x^d) + 9*log(1-x^d)) / 24 + [d mod 60 in {4,8,16,28,32,44,52,56}] * (7*log(1-5x^d) + 5*log(1-2x^d)) / 15 + [d mod 60 in {3,9,21,27,33,39,51,57}] * (7*log(1-5x^d) + 10*log(1-3x^d) + 15*log(1-x^d)) / 40 + [d mod 60 in {2,14,22,26,34,38,46,58}] * (13*log(1-5x^d) + 20*log(1-2x^d) + 15*log(1-x^d)) / 60 +[d mod 60 in{1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59}] * (log(1-5x^d) + 10*log(1-3x^d) + 20*log(1-2x^d) + 45*log(1-x^d)) / 120).
%F (End)
%t Adn[d_, n_] := Module[{ c, t1, t2}, t2 = 0; For[c = 1, c <= d, c++, If[Mod[d, c] == 0 , t2 = t2 + (x^c/c)*(E^(c*z) - 1)]]; t1 = E^t2; t1 = Series[t1, {z, 0, n+1}]; Coefficient[t1, z, n]*n!]; Pn[n_] := Module[{ d, e, t1}, t1 = 0; For[d = 1, d <= n, d++, If[Mod[n, d] == 0, t1 = t1 + EulerPhi[d]*Adn[d, n/d]/n]]; t1/(1 - x)]; Pnq[n_, q_] := Module[{t1}, t1 = Series[Pn[n], {x, 0, q+1}] ; Coefficient[t1, x, q]]; a[n_] := Pnq[n, 5]; Table[Print[an = a[n]]; an, {n, 1, 24}] (* _Jean-François Alcover_, Oct 04 2013, after _N. J. A. Sloane_'s Maple code *)
%t (* this Mathematica program uses Gilbert and Riordan's recurrence formula, which they recommend for calculations: *)
%t Adn[d_, n_] := Adn[d, n] = If[1==n, DivisorSum[d, x^# &],
%t Expand[Adn[d, 1] Adn[d, n-1] + D[Adn[d, n-1], x] x]];
%t Table[SeriesCoefficient[DivisorSum[n, EulerPhi[#] Adn[#, n/#] &]
%t /(n (1 - x)), {x, 0, 5}], {n, 1, 40}] (* _Robert A. Russell_, Feb 24 2018 *)
%t From _Robert A. Russell_, May 29 2018: (Start)
%t Table[(1/n) DivisorSum[n, EulerPhi[#] Which[Divisible[#, 60], 5 StirlingS2[n/#+4, 5] - 50 StirlingS2[n/#+3, 5] + 175 StirlingS2[n/#+2, 5] - 250 StirlingS2[n/#+1, 5] + 120 StirlingS2[n/#, 5], Divisible[#, 30], 4 StirlingS2[n/#+4, 5] - 41 StirlingS2[n/#+3, 5] + 149 StirlingS2[n/#+2, 5] - 226 StirlingS2[n/#+1, 5] + 120 StirlingS2[n/#, 5], Divisible[#, 20], 4 StirlingS2[n/#+4, 5] - 42 StirlingS2[n/#+3, 5] + 156 StirlingS2[n/#+2, 5] - 238 StirlingS2[n/#+1, 5] + 120 StirlingS2[n/#, 5], Divisible[#, 15], 3 StirlingS2[n/#+4, 5] - 33 StirlingS2[n/#+3, 5] + 129 StirlingS2[n/#+2, 5] - 210 StirlingS2[n/#+1, 5] + 120 StirlingS2[n/#, 5], Divisible[#, 12], 4 StirlingS2[n/#+4, 5] - 40 StirlingS2[n/#+3, 5] + 140 StirlingS2[n/#+2, 5] - 200 StirlingS2[n/#+1, 5] + 96 StirlingS2[n/#, 5], Divisible[#, 10], 3 StirlingS2[n/#+4, 5] - 33 StirlingS2[n/#+3, 5] + 130 StirlingS2[n/#+2, 5] - 214 StirlingS2[n/#+1, 5] + 120 StirlingS2[n/#, 5], Divisible[#, 6], 3 StirlingS2[n/#+4, 5] - 31 StirlingS2[n/#+3, 5] + 114 StirlingS2[n/#+2, 5] - 176 StirlingS2[n/#+1, 5] + 96 StirlingS2[n/#, 5], Divisible[#, 5], 2 StirlingS2[n/#+4, 5] - 23 StirlingS2[n/#+3, 5] + 95 StirlingS2[n/#+2, 5] - 165 StirlingS2[n/#+1, 5] + 100 StirlingS2[n/#, 5], Divisible[#, 4], 3 StirlingS2[n/#+4, 5] - 32 StirlingS2[n/#+3, 5] + 121 StirlingS2[n/#+2, 5] - 188 StirlingS2[n/#+1, 5] + 96 StirlingS2[n/#, 5], Divisible[#, 3], 2 StirlingS2[n/#+4, 5] - 23 StirlingS2[n/#+3, 5] + 94 StirlingS2[n/#+2, 5] - 160 StirlingS2[n/#+1, 5] + 96 StirlingS2[n/#, 5], Divisible[#, 2], 2 StirlingS2[n/#+4, 5] - 23 StirlingS2[n/#+3, 5] + 95 StirlingS2[n/#+2, 5] - 164 StirlingS2[n/#+1, 5] + 96 StirlingS2[n/#, 5], True, StirlingS2[n/#+4, 5] - 13 StirlingS2[n/#+3, 5] + 60 StirlingS2[n/#+2, 5] - 115 StirlingS2[n/#+1, 5] + 76 StirlingS2[n/#, 5]] &], {n, 1, 40}]
%t mx = 40; Drop[CoefficientList[Series[1-Sum[(EulerPhi[d] / d) Which[ Divisible[d, 60], Log[1-5x^d], Divisible[d, 30], (3 Log[1-5x^d] + Log[1-x^d]) / 4, Divisible[d, 20], (2 Log[1-5x^d] + Log[1-2x^d]) / 3, Divisible[d, 15], (3 Log[1-5x^d] + 2 Log[1-3x^d] + 3 Log[1-x^d]) / 8, Divisible[d, 12], 4 Log[1-5x^d] / 5, Divisible[d, 10], (5 Log[1-5x^d] + 4 Log[1-2x^d] + 3 Log[1-x^d]) / 12, Divisible[d, 6], (11 Log[1-5x^d] + 5 Log[1-x^d]) / 20, Divisible[d, 5], (5 Log[1-5x^d] + 2 Log[1-3x^d] + 4 Log[1-2x^d] + 9 Log[1-x^d]) / 24, Divisible[d, 4], (7 Log[1-5x^d] + 5 Log[1-2x^d]) / 15, Divisible[d, 3], (7 Log[1-5x^d] + 10 Log[1-3x^d] + 15 Log[1-x^d]) / 40, Divisible[d, 2], (13 Log[1-5x^d] + 20 Log[1-2x^d] + 15 Log[1-x^d]) / 60, True, (Log[1-5x^d] + 10 Log[1-3x^d] + 20 Log[1-2x^d] + 45 Log[1-x^d]) / 120], {d, 1, mx}], {x, 0, mx}], x], 1]
%t (End)
%Y Cf. A000013, A001869.
%K nonn
%O 1,2
%A _Marks R. Nester_