A019536
Number of length n necklaces with integer entries that cover an initial interval of positive integers.
Original entry on oeis.org
1, 2, 5, 20, 109, 784, 6757, 68240, 787477, 10224812, 147512053, 2340964372, 40527565261, 760095929840, 15352212731933, 332228417657960, 7668868648772701, 188085259070219000, 4884294069438337429
Offset: 1
Manfred Goebel (goebel(AT)informatik.uni-tuebingen.de)
a(3) = 5 since there are the following length 3 words up to rotation:
111, 112, 122, 123, 132.
a(4) = 20 since there are the following length 4 words up to rotation:
1111,
1112, 1122, 1212, 1222,
1123, 1132, 1213, 1223, 1232, 1233, 1322, 1323, 1332,
1234, 1243, 1324, 1342, 1423, 1432.
- G. C. Greubel, Table of n, a(n) for n = 1..420
- M. Goebel, On the number of special permutation-invariant orbits and terms, in: Applicable Algebra in Engin., Comm. and Comp. (AAECC 8), Volume 8, Number 6, 1997, pp. 505-509 (Lect. Notes Comp. Sci.); see p. 509 (stated as an open problem).
- F. Ruskey, Necklaces, Lyndon words, De Bruijn sequences, etc.
- F. Ruskey, Necklaces, Lyndon words, De Bruijn sequences, etc. [Cached copy, with permission, pdf format only]
- Eric Weisstein's world of Mathematics, Necklaces.
-
Needs["DiscreteMath`Combinatorica`"];
mult[li:{__Integer}] := Multinomial @@ Length /@ Split[Sort[li]];
neck[li:{__Integer}] := Module[{n, d}, n=Plus @@ li; d=n-First[li];Fold[ #1+(EulerPhi[ #2]*(n/#2)!)/Times @@ ((li/#2)!)&, 0, Divisors[GCD @@ li]]/n];
Table[(mult /@ Partitions[n]).(neck /@ Partitions[n]), {n, 24}]
(* second program: *)
a[n_] := Sum[DivisorSum[n, EulerPhi[#]*StirlingS2[n/#, k] k! &]/n, {k, 1, n}];
Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Mar 31 2016, after Philippe Deléham *)
-
a(n) = sum(k=1, n, sumdiv(n, d, eulerphi(d)*stirling(n/d, k, 2)*k!)/n); \\ Michel Marcus, Mar 31 2016
A152175
Triangle read by rows: T(n,k) is the number of k-block partitions of an n-set up to rotations.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 3, 5, 2, 1, 1, 7, 18, 13, 3, 1, 1, 9, 43, 50, 20, 3, 1, 1, 19, 126, 221, 136, 36, 4, 1, 1, 29, 339, 866, 773, 296, 52, 4, 1, 1, 55, 946, 3437, 4281, 2303, 596, 78, 5, 1, 1, 93, 2591, 13250, 22430, 16317, 5817, 1080, 105, 5, 1, 1, 179, 7254, 51075, 115100, 110462, 52376, 13299, 1873, 147, 6, 1
Offset: 1
Triangle begins with T(1,1):
1;
1, 1;
1, 1, 1;
1, 3, 2, 1;
1, 3, 5, 2, 1;
1, 7, 18, 13, 3, 1;
1, 9, 43, 50, 20, 3, 1;
1, 19, 126, 221, 136, 36, 4, 1;
1, 29, 339, 866, 773, 296, 52, 4, 1;
1, 55, 946, 3437, 4281, 2303, 596, 78, 5, 1;
1, 93, 2591, 13250, 22430, 16317, 5817, 1080, 105 , 5, 1;
1, 179, 7254, 51075, 115100, 110462, 52376, 13299, 1873, 147, 6, 1;
1, 315, 20125, 194810, 577577, 717024, 439648, 146124, 27654, 3025, 187, 6, 1;
...
For T(4,2)=3, the set partitions are AAAB, AABB, and ABAB.
For T(4,3)=2, the set partitions are AABC and ABAC.
- 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]
A(1,n,k) in formula is the Stirling subset number
A008277.
-
(* Using recursion formula from Gilbert and Riordan:*)
Adn[d_, n_] := Adn[d, n] = Which[0==n, 1, 1==n, DivisorSum[d, x^# &],
1==d, Sum[StirlingS2[n, k] x^k, {k, 0, n}],
True, Expand[Adn[d, 1] Adn[d, n-1] + D[Adn[d, n - 1], x] x]];
Table[CoefficientList[DivisorSum[n, EulerPhi[#] Adn[#, n/#] &]/(x n), x],
{n, 1, 10}] // Flatten (* Robert A. Russell, Feb 23 2018 *)
Adnk[d_,n_,k_] := Adnk[d,n,k] = If[n>0 && k>0, Adnk[d,n-1,k]k + DivisorSum[d,Adnk[d,n-1,k-#] &], Boole[n==0 && k==0]]
Table[DivisorSum[n,EulerPhi[#]Adnk[#,n/#,k]&]/n,{n,1,12},{k,1,n}] // Flatten (* Robert A. Russell, Oct 16 2018 *)
-
\\ see A056391 for Polya enumeration functions
T(n,k) = NonequivalentStructsExactly(CyclicPerms(n), k); \\ Andrew Howroyd, Oct 14 2017
-
R(n) = {Mat(Col([Vecrev(p/y, n) | p<-Vec(intformal(sum(m=1, n, eulerphi(m) * subst(serlaplace(-1 + exp(sumdiv(m, d, y^d*(exp(d*x + O(x*x^(n\m)))-1)/d))), x, x^m))/x))]))}
{ my(A=R(12)); for(n=1, #A, print(A[n, 1..n])) } \\ Andrew Howroyd, Sep 20 2019
A254040
Number T(n,k) of primitive (= aperiodic) n-bead necklaces with colored beads of exactly k different colors; triangle T(n,k), n >= 0, 0 <= k <= n, read by rows.
Original entry on oeis.org
1, 0, 1, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 9, 6, 0, 0, 6, 30, 48, 24, 0, 0, 9, 89, 260, 300, 120, 0, 0, 18, 258, 1200, 2400, 2160, 720, 0, 0, 30, 720, 5100, 15750, 23940, 17640, 5040, 0, 0, 56, 2016, 20720, 92680, 211680, 258720, 161280, 40320
Offset: 0
Triangle T(n,k) begins:
1;
0, 1;
0, 0, 1;
0, 0, 2, 2;
0, 0, 3, 9, 6;
0, 0, 6, 30, 48, 24;
0, 0, 9, 89, 260, 300, 120;
0, 0, 18, 258, 1200, 2400, 2160, 720;
0, 0, 30, 720, 5100, 15750, 23940, 17640, 5040;
...
The T(4,3) = 9 normal Lyndon words of length 4 with maximum 3 are: 1233, 1323, 1332, 1223, 1232, 1322, 1123, 1132, 1213. - _Gus Wiseman_, Dec 22 2017
Columns k=0-10 give:
A000007,
A063524,
A001037 (for n>1),
A056288,
A056289,
A056290,
A056291,
A254079,
A254080,
A254081,
A254082.
-
with(numtheory):
b:= proc(n, k) option remember; `if`(n=0, 1,
add(mobius(n/d)*k^d, d=divisors(n))/n)
end:
T:= (n, k)-> add(b(n, k-j)*binomial(k,j)*(-1)^j, j=0..k):
seq(seq(T(n, k), k=0..n), n=0..10);
-
b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[MoebiusMu[n/d]*k^d, {d, Divisors[n]}]/n]; T[n_, k_] := Sum[b[n, k-j]*Binomial[k, j]*(-1)^j, {j, 0, k}]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Jan 27 2015, after Alois P. Heinz *)
LyndonQ[q_]:=q==={}||Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And]&&Array[RotateRight[q,#]&,Length[q],1,UnsameQ];
allnorm[n_,k_]:=If[k===0,If[n===0,{{}}, {}],Join@@Permutations/@Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Select[Subsets[Range[n-1]+1],Length[#]===k-1&]];
Table[Length[Select[allnorm[n,k],LyndonQ]],{n,0,7},{k,0,n}] (* Gus Wiseman, Dec 22 2017 *)
A273891
Triangle read by rows: T(n,k) is the number of n-bead bracelets with exactly k different colored beads.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 4, 6, 3, 1, 6, 18, 24, 12, 1, 11, 56, 136, 150, 60, 1, 16, 147, 612, 1200, 1080, 360, 1, 28, 411, 2619, 7905, 11970, 8820, 2520, 1, 44, 1084, 10480, 46400, 105840, 129360, 80640, 20160, 1, 76, 2979, 41388, 255636, 821952, 1481760, 1512000, 816480, 181440
Offset: 1
Triangle begins with T(1,1):
1;
1, 1;
1, 2, 1;
1, 4, 6, 3;
1, 6, 18, 24, 12;
1, 11, 56, 136, 150, 60;
1, 16, 147, 612, 1200, 1080, 360;
1, 28, 411, 2619, 7905, 11970, 8820, 2520;
1, 44, 1084, 10480, 46400, 105840, 129360, 80640, 20160;
1, 76, 2979, 41388, 255636, 821952, 1481760, 1512000, 816480, 181440;
For T(4,2)=4, the arrangements are AAAB, AABB, ABAB, and ABBB, all achiral.
For T(4,4)=3, the arrangements are ABCD, ABDC, and ACBD, whose chiral partners are ADCB, ACDB, and ADBC respectively. - _Robert A. Russell_, Sep 26 2018
-
(* t = A081720 *) t[n_, k_] := (For[t1 = 0; d = 1, d <= n, d++, If[Mod[n, d] == 0, t1 = t1 + EulerPhi[d]*k^(n/d)]]; If[EvenQ[n], (t1 + (n/2)*(1 + k)*k^(n/2))/(2*n), (t1 + n*k^((n+1)/2))/(2*n)]); T[n_, k_] := Sum[(-1)^i * Binomial[k, i]*t[n, k-i], {i, 0, k-1}]; Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Oct 07 2017, after Andrew Howroyd *)
Table[k! DivisorSum[n, EulerPhi[#] StirlingS2[n/#,k]&]/(2n) + k!(StirlingS2[Floor[(n+1)/2], k] + StirlingS2[Ceiling[(n+1)/2], k])/4, {n,1,10}, {k,1,n}] // Flatten (* Robert A. Russell, Sep 26 2018 *)
A052823
A simple grammar: cycles of pairs of sequences.
Original entry on oeis.org
0, 0, 1, 2, 4, 6, 12, 18, 34, 58, 106, 186, 350, 630, 1180, 2190, 4114, 7710, 14600, 27594, 52486, 99878, 190744, 364722, 699250, 1342182, 2581426, 4971066, 9587578, 18512790, 35792566, 69273666, 134219794, 260301174, 505294126, 981706830, 1908881898
Offset: 0
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 788
- Terry R. Payne, Luke Riley, Katie Atkinson, and Paul Dunne, Using Two Colour Necklaces to Fairly Allocate Coalition Value Calculations, 23rd IEEE/WIC Int'l Conf. Web Intel. Intel. Agent Tech. (WI-IAT 2024). See p. 7.
- Shingo Saito, Tatsushi Tanaka, and Noriko Wakabayashi, Combinatorial Remarks on the Cyclic Sum Formula for Multiple Zeta Values, J. Int. Seq. 14 (2011) # 11.2.4, Table 2.
-
spec := [S,{B=Sequence(Z,1 <= card),C=Prod(B,B),S= Cycle(C)},unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
-
k=2; Prepend[Table[k!DivisorSum[n,EulerPhi[#]StirlingS2[n/#,k]&]/n,{n,1,30}],0] (* Robert A. Russell, Sep 26 2018 *)
A305540
Triangle read by rows: T(n,k) is the number of achiral loops (necklaces or bracelets) of length n using exactly k different colors.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 4, 3, 1, 6, 6, 1, 10, 21, 12, 1, 14, 36, 24, 1, 22, 93, 132, 60, 1, 30, 150, 240, 120, 1, 46, 345, 900, 960, 360, 1, 62, 540, 1560, 1800, 720, 1, 94, 1173, 4980, 9300, 7920, 2520, 1, 126, 1806, 8400, 16800, 15120, 5040, 1, 190, 3801, 24612, 71400, 103320, 73080, 20160, 1, 254, 5796, 40824, 126000, 191520, 141120, 40320
Offset: 1
The triangle begins with T(1,1):
1;
1, 1;
1, 2;
1, 4, 3;
1, 6, 6;
1, 10, 21, 12;
1, 14, 36, 24;
1, 22, 93, 132, 60;
1, 30, 150, 240, 120;
1, 46, 345, 900, 960, 360;
1, 62, 540, 1560, 1800, 720;
1, 94, 1173, 4980, 9300, 7920, 2520;
1, 126, 1806, 8400, 16800, 15120, 5040;
1, 190, 3801, 24612, 71400, 103320, 73080, 20160;
1, 254, 5796, 40824, 126000, 191520, 141120, 40320;
1, 382, 11973, 113652, 480060, 1048320, 1234800, 745920, 181440;
1, 510, 18150, 186480, 834120, 1905120, 2328480, 1451520, 362880;
For a(4,2)=4, the achiral loops are AAAB, AABB, ABAB, and ABBB.
-
Table[(k!/2) (StirlingS2[Floor[(n + 1)/2], k] + StirlingS2[Ceiling[(n + 1)/2], k]), {n, 1, 15}, {k, 1, Ceiling[(n + 1)/2]}] // Flatten
-
T(n, k) = (k!/2)*(stirling(floor((n+1)/2), k, 2)+stirling(ceil((n+1)/2), k, 2));
tabf(nn) = for(n=1, nn, for (k=1, ceil((n+1)/2), print1(T(n, k), ", ")); print); \\ Michel Marcus, Jul 02 2018
A305541
Triangle read by rows: T(n,k) is the number of chiral pairs of color loops of length n with exactly k different colors.
Original entry on oeis.org
0, 0, 0, 0, 0, 1, 0, 0, 3, 3, 0, 0, 12, 24, 12, 0, 1, 35, 124, 150, 60, 0, 2, 111, 588, 1200, 1080, 360, 0, 6, 318, 2487, 7845, 11970, 8820, 2520, 0, 14, 934, 10240, 46280, 105840, 129360, 80640, 20160, 0, 30, 2634, 40488, 254676, 821592, 1481760, 1512000, 816480, 181440, 0, 62, 7503, 158220, 1344900, 5873760, 14658840, 21772800, 19051200, 9072000, 1814400
Offset: 1
Triangle T(n,k) begins:
0;
0, 0;
0, 0, 1;
0, 0, 3, 3;
0, 0, 12, 24, 12;
0, 1, 35, 124, 150, 60;
0, 2, 111, 588, 1200, 1080, 360;
0, 6, 318, 2487, 7845, 11970, 8820, 2520;
0, 14, 934, 10240, 46280, 105840, 129360, 80640, 20160;
0, 30, 2634, 40488, 254676, 821592, 1481760, 1512000, 816480, 181440;
...
For T(4,3)=3, the chiral pairs are AABC-AACB, ABBC-ACBB, and ABCC-ACCB.
For T(4,4)=3, the chiral pairs are ABCD-ADCB, ABDC-ACDB, and ACBD-ADBC.
-
Table[(k!/(2n)) DivisorSum[n, EulerPhi[#] StirlingS2[n/#, k] &] - (k!/4) (StirlingS2[Floor[(n+1)/2], k] + StirlingS2[Ceiling[(n+1)/2], k]), {n, 1, 15}, {k, 1, n}] // Flatten
-
T(n,k) = {-k!*(stirling((n+1)\2,k,2) + stirling(n\2+1,k,2))/4 + k!*sumdiv(n,d, eulerphi(d)*stirling(n/d,k,2))/(2*n)} \\ Andrew Howroyd, Sep 13 2019
A054631
Triangle read by rows: row n (n >= 1) contains the numbers T(n,k) = Sum_{d|n} phi(d)*k^(n/d)/n, for k=1..n.
Original entry on oeis.org
1, 1, 3, 1, 4, 11, 1, 6, 24, 70, 1, 8, 51, 208, 629, 1, 14, 130, 700, 2635, 7826, 1, 20, 315, 2344, 11165, 39996, 117655, 1, 36, 834, 8230, 48915, 210126, 720916, 2097684, 1, 60, 2195, 29144, 217045, 1119796, 4483815, 14913200, 43046889
Offset: 1
1;
1, 3; (A000217)
1, 4, 11; (A006527)
1, 6, 24, 70; (A006528)
1, 8, 51, 208, 629; (A054620)
1, 14, 130, 700, 2635, 7826; (A006565)
1, 20, 315, 2344, 11165, 39996, 117655; (A054621)
-
A054631 := proc(n,k) add( numtheory[phi](d)*k^(n/d),d=numtheory[divisors](n) ) ; %/n ; end proc: # R. J. Mathar, Aug 30 2011
-
Needs["Combinatorica`"]; Table[Table[NumberOfNecklaces[n, k, Cyclic], {k, 1, n}], {n, 1, 8}] //Grid (* Geoffrey Critzer, Oct 07 2012, after code by T. D. Noe in A027671 *)
t[n_, k_] := Sum[EulerPhi[d]*k^(n/d)/n, {d, Divisors[n]}]; Table[t[n, k], {n, 1, 9}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 20 2014 *)
-
T(n, k) = sumdiv(n, d, eulerphi(d)*k^(n/d))/n; \\ Seiichi Manyama, Mar 10 2021
-
T(n, k) = sum(j=1, n, k^gcd(j, n))/n; \\ Seiichi Manyama, Mar 10 2021
A056283
Number of n-bead necklaces with exactly three different colored beads.
Original entry on oeis.org
0, 0, 2, 9, 30, 91, 258, 729, 2018, 5613, 15546, 43315, 120750, 338259, 950062, 2678499, 7573350, 21480739, 61088874, 174184755, 497812638, 1425847623, 4092087522, 11765822365, 33887517870, 97756387365, 282414624746, 816999710223, 2366509198350, 6862930841141
Offset: 1
For n=3, the two necklaces are ABC and ACB.
- 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]
-
k=3; Table[k!DivisorSum[n,EulerPhi[#]StirlingS2[n/#,k]&]/n,{n,1,30}] (* Robert A. Russell, Sep 26 2018 *)
A056284
Number of n-bead necklaces with exactly four different colored beads.
Original entry on oeis.org
0, 0, 0, 6, 48, 260, 1200, 5106, 20720, 81876, 318000, 1223136, 4675440, 17815020, 67769552, 257700906, 980240880, 3731753180, 14222737200, 54278580036, 207438938000, 793940475900, 3043140078000, 11681057249536, 44900438149296, 172824331826580, 666070256489680
Offset: 1
For n=4, the six necklaces are ABCD, ABDC, ACBD, ACDB, ADBC and ADCB.
- 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]
-
k=4; Table[k!DivisorSum[n,EulerPhi[#]StirlingS2[n/#,k]&]/n,{n,1,30}] (* Robert A. Russell, Sep 26 2018 *)
-
a(n) = my(k=4);(k!/n)*sumdiv(n, d, eulerphi(d)*stirling(n/d,k,2)); \\ Michel Marcus, Sep 27 2018
Showing 1-10 of 15 results.
Comments