A000031
Number of n-bead necklaces with 2 colors when turning over is not allowed; also number of output sequences from a simple n-stage cycling shift register; also number of binary irreducible polynomials whose degree divides n.
Original entry on oeis.org
1, 2, 3, 4, 6, 8, 14, 20, 36, 60, 108, 188, 352, 632, 1182, 2192, 4116, 7712, 14602, 27596, 52488, 99880, 190746, 364724, 699252, 1342184, 2581428, 4971068, 9587580, 18512792, 35792568, 69273668, 134219796, 260301176, 505294128, 981706832
Offset: 0
For n=3 and n=4 the necklaces are {000,001,011,111} and {0000,0001,0011,0101,0111,1111}.
The analogous shift register sequences are {000..., 001001..., 011011..., 111...} and {000..., 00010001..., 00110011..., 0101..., 01110111..., 111...}.
- S. W. Golomb, Shift-Register Sequences, Holden-Day, San Francisco, 1967, pp. 120, 172.
- May, Robert M. "Simple mathematical models with very complicated dynamics." Nature, Vol. 261, June 10, 1976, pp. 459-467; reprinted in The Theory of Chaotic Attractors, pp. 85-93. Springer, New York, NY, 2004. The sequences listed in Table 2 are A000079, A027375, A000031, A001037, A000048, A051841. - N. J. A. Sloane, Mar 17 2019
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 7.112(a).
- Seiichi Manyama, Table of n, a(n) for n = 0..3333 (first 201 terms from T. D. Noe)
- Nicolás Álvarez, Verónica Becher, Martín Mereb, Ivo Pajor, and Carlos Miguel Soto, On extremal factors of de Bruijn-like graphs, arXiv:2308.16257 [math.CO], 2023. See references.
- Joerg Arndt, Matters Computational (The Fxtbook), p. 151, pp. 379-383.
- P. J. Cameron, Sequences realized by oligomorphic permutation groups, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.
- J.-M. Champarnaud, G. Hansel, and D. Perrin, Unavoidable sets of constant length, Internat. J. Alg. Comput. 14 (2004), 241-251.
- Vladimir Dotsenko and Irvin Roy Hentzel, On the conjecture of Kashuba and Mathieu about free Jordan algebras, arXiv:2507.00437 [math.RA], 2025. See p. 14.
- James East and Ron Niles, Integer polygons of given perimeter, arXiv:1710.11245 [math.CO], 2017.
- S. N. Ethier and J. Lee, Parrondo games with spatial dependence, arXiv preprint arXiv:1202.2609 [math.PR], 2012.
- S. N. Ethier, Counting toroidal binary arrays, arXiv preprint arXiv:1301.2352 [math.CO], 2013 and J. Int. Seq. 16 (2013) #13.4.7.
- N. J. Fine, Classes of periodic sequences, Illinois J. Math., 2 (1958), 285-302.
- P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009; see pages 18, 64.
- H. Fredricksen, The lexicographically least de Bruijn cycle, J. Combin. Theory, 9 (1970) 1-5.
- Harold Fredricksen, An algorithm for generating necklaces of beads in two colors, Discrete Mathematics, Volume 61, Issues 2-3, September 1986, Pages 181-188.
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 2
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 130
- Juhani Karhumäki, S. Puzynina, M. Rao, and M. A. Whiteland, On cardinalities of k-abelian equivalence classes, arXiv preprint arXiv:1605.03319 [math.CO], 2016.
- Abraham Lempel, On extremal factors of the de Bruijn graph, J. Combinatorial Theory Ser. B 11 1971 17--27. MR0276126 (43 #1874).
- Karyn McLellan, Periodic coefficients and random Fibonacci sequences, Electronic Journal of Combinatorics, 20(4), 2013, #P32.
- Johannes Mykkeltveit, A proof of Golomb's conjecture for the de Bruijn graph, J. Combinatorial Theory Ser. B 13 (1972), 40-45. MR0323629 (48 #1985).
- Matthew Parker, The first 25K terms (7-Zip compressed file) [a large file]
- J. Riordan, Letter to N. J. A. Sloane, Jul. 1978
- Frank Ruskey, Necklaces, Lyndon words, De Bruijn sequences, etc.
- Frank Ruskey, Necklaces, Lyndon words, De Bruijn sequences, etc. [Cached copy, with permission, pdf format only]
- Ville Salo, Universal gates with wires in a row, arXiv:1809.08050 [math.GR], 2018.
- J. A. Siehler, The Finite Lamplighter Groups: A Guided Tour, College Mathematics Journal, Vol. 43, No. 3 (May 2012), pp. 203-211.
- N. J. A. Sloane, On single-deletion-correcting codes
- N. J. A. Sloane, On single-deletion-correcting codes, arXiv:math/0207197 [math.CO], 2002; in Codes and Designs (Columbus, OH, 2000), 273-291, Ohio State Univ. Math. Res. Inst. Publ., 10, de Gruyter, Berlin, 2002.
- David Thomson, Musical Polygons, Mathematics Today, Vol. 57, No. 2 (April 2021), pp. 50-51.
- R. C. Titsworth, Equivalence classes of periodic sequences, Illinois J. Math., 8 (1964), 266-270.
- A. M. Uludag, A. Zeytin and M. Durmus, Binary Quadratic Forms as Dessins, 2012.
- Eric Weisstein's World of Mathematics, Necklace
- Wolfram Research, Number of necklaces
- Index entries for "core" sequences
- Index entries for sequences related to necklaces
A008965(n) = a(n) - 1 allowing different offsets.
-
a000031 0 = 1
a000031 n = (`div` n) $ sum $
zipWith (*) (map a000010 divs) (map a000079 $ reverse divs)
where divs = a027750_row n
-- Reinhard Zumkeller, Mar 21 2013
-
with(numtheory); A000031 := proc(n) local d,s; if n = 0 then RETURN(1); else s := 0; for d in divisors(n) do s := s+phi(d)*2^(n/d); od; RETURN(s/n); fi; end; [ seq(A000031(n), n=0..50) ];
-
a[n_] := Sum[If[Mod[n, d] == 0, EulerPhi[d] 2^(n/d), 0], {d, 1, n}]/n
a[n_] := Fold[#1 + 2^(n/#2) EulerPhi[#2] &, 0, Divisors[n]]/n (* Ben Branman, Jan 08 2011 *)
Table[Expand[CycleIndex[CyclicGroup[n], t] /. Table[t[i]-> 2, {i, 1, n}]], {n,0, 30}] (* Geoffrey Critzer, Mar 06 2011*)
a[0] = 1; a[n_] := DivisorSum[n, EulerPhi[#]*2^(n/#)&]/n; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 03 2016 *)
mx=40; CoefficientList[Series[1-Sum[EulerPhi[i] Log[1-2*x^i]/i,{i,1,mx}],{x,0,mx}],x] (*Herbert Kociemba, Oct 29 2016 *)
-
{A000031(n)=if(n==0,1,sumdiv(n,d,eulerphi(d)*2^(n/d))/n)} \\ Randall L Rathbun, Jan 11 2002
-
from sympy import totient, divisors
def A000031(n): return sum(totient(d)*(1<Chai Wah Wu, Nov 16 2022
There is an error in Fig. M3860 in the 1995 Encyclopedia of Integer Sequences: in the third line, the formula for
A000031 = M0564 should be (1/n) sum phi(d) 2^(n/d).
A056665
Number of equivalence classes of n-valued Post functions of 1 variable under action of complementing group C(1,n).
Original entry on oeis.org
1, 3, 11, 70, 629, 7826, 117655, 2097684, 43046889, 1000010044, 25937424611, 743008623292, 23298085122493, 793714780783770, 29192926025492783, 1152921504875290696, 48661191875666868497, 2185911559749720272442, 104127350297911241532859
Offset: 1
The 11 necklaces for n=3 are (grouped by partition of 3): (RRR,GGG,BBB),(RRG,RGG, RRB,RBB, GGB,GBB), (RGB,RBG).
- D. E. Knuth. Generating All Tuples and Permutations. The Art of Computer Programming, Vol. 4, Fascicle 2, 7.2.1.1. Addison-Wesley, 2005.
- Alois P. Heinz, Table of n, a(n) for n = 1..200
- M. A. Harrison and R. G. High, On the cycle index of a product of permutation groups, J. Combin. Theory, 4 (1968), 277-299.
- F. Ruskey, C. Savage, and T. M. Y. Wang, Generating necklaces, Journal of Algorithms, 13(3), 414 - 430, 1992.
- Index entries for sequences related to groups
Cf.
A075147 Aperiodic necklaces, a subset of this sequence.
Cf.
A000169 Classes under translation mod n
Cf.
A168658 Classes under complement to n+1
Cf.
A130293 Classes under translation and rotation
Cf.
A081721 Classes under rotation and reversal
Cf.
A275550 Classes under reversal and complement
Cf.
A275551 Classes under translation and reversal
Cf.
A275552 Classes under translation and complement
Cf.
A275553 Classes under translation, complement and reversal
Cf.
A275554 Classes under translation, rotation and complement
Cf.
A275555 Classes under translation, rotation and reversal
Cf.
A275556 Classes under translation, rotation, complement and reversal
Cf.
A275557 Classes under rotation and complement
Cf.
A275558 Classes under rotation, complement and reversal
-
with(numtheory):
a:= n-> add(phi(d)*n^(n/d), d=divisors(n))/n:
seq(a(n), n=1..25); # Alois P. Heinz, Jun 18 2013
-
Table[Fold[ #1+EulerPhi[ #2] n^(n/#2)&, 0, Divisors[n]]/n, {n, 7}]
-
a(n) = sum(k=1,n,n^gcd(k,n)) / n; \\ Joerg Arndt, Mar 19 2017
-
# This algorithm counts all n-ary n-tuples (a_1,..,a_n) such that the string a_1...a_n is preprime. It is algorithm F in Knuth 7.2.1.1.
def A056665_list(n):
C = []
for m in (1..n):
a = [0]*(n+1); a[0]=-1;
j = 1; count = 0
while(true):
if m%j == 0 : count += 1;
j = n
while a[j] >= m-1 : j -= 1
if j == 0 : break
a[j] += 1
for k in (j+1..n): a[k] = a[k-j]
C.append(count)
return C
-
def A056665(n): return sum(euler_phi(d)*n^(n//d)//n for d in divisors(n))
[A056665(n) for n in (1..18)] # Peter Luschny, Aug 12 2012
A185651
A(n,k) = Sum_{d|n} phi(d)*k^(n/d); square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 6, 3, 0, 0, 4, 12, 12, 4, 0, 0, 5, 20, 33, 24, 5, 0, 0, 6, 30, 72, 96, 40, 6, 0, 0, 7, 42, 135, 280, 255, 84, 7, 0, 0, 8, 56, 228, 660, 1040, 780, 140, 8, 0, 0, 9, 72, 357, 1344, 3145, 4200, 2205, 288, 9, 0
Offset: 0
Square array A(n,k) begins:
0, 0, 0, 0, 0, 0, 0, ...
0, 1, 2, 3, 4, 5, 6, ...
0, 2, 6, 12, 20, 30, 42, ...
0, 3, 12, 33, 72, 135, 228, ...
0, 4, 24, 96, 280, 660, 1344, ...
0, 5, 40, 255, 1040, 3145, 7800, ...
0, 6, 84, 780, 4200, 15810, 46956, ...
Columns k=0..10 give
A000004,
A001477,
A053635,
A054610,
A054611,
A054612,
A054613,
A054614,
A054615,
A054616,
A054617.
Rows n=0..10 give
A000004,
A001477,
A002378,
A054602,
A054603,
A054604,
A054605,
A054606,
A054607,
A054608,
A054609.
-
with(numtheory):
A:= (n, k)-> add(phi(d)*k^(n/d), d=divisors(n)):
seq(seq(A(n, d-n), n=0..d), d=0..12);
-
a[, 0] = a[0, ] = 0; a[n_, k_] := Sum[EulerPhi[d]*k^(n/d), {d, Divisors[n]}]; Table[a[n - k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Dec 06 2013 *)
A001867
Number of n-bead necklaces with 3 colors.
Original entry on oeis.org
1, 3, 6, 11, 24, 51, 130, 315, 834, 2195, 5934, 16107, 44368, 122643, 341802, 956635, 2690844, 7596483, 21524542, 61171659, 174342216, 498112275, 1426419858, 4093181691, 11767920118, 33891544419, 97764131646, 282429537947, 817028472960, 2366564736723
Offset: 0
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 162.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 7.112(a).
- T. D. Noe, Table of n, a(n) for n = 0..200
- Joscha Diehl, Rosa Preiß, and Jeremy Reizenstein, Conjugation, loop and closure invariants of the iterated-integrals signature, arXiv:2412.19670 [math.RA], 2024. See pp. 6, 20.
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
- V. E. Hoggatt, The Fifth Oldie from the Vault. Problem B-415, Elementary Problems and Solutions, Fibonacci Quart. 59 (2021), no. 3, pp. 274-275.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 3
- Juhani Karhumäki, S. Puzynina, M. Rao, and M. A. Whiteland, On cardinalities of k-abelian equivalence classes, arXiv preprint arXiv:1605.03319 [math.CO], 2016.
- J. Riordan, Letter to N. J. A. Sloane, Jul. 1978
- Index entries for sequences related to necklaces
-
with(numtheory): A001867:= n-> `if` (n=0, 1, add (phi(d)* 3^(n/d), d=divisors(n))/n): seq (A001867(n), n=0..40);
spec := [N, {N=Cycle(bead), bead=Union(R,G,B), R=Atom, B=Atom, G=Atom}]; [seq(combstruct[count](spec, size=n), n=1..40)];
-
Prepend[Table[CyclicGroupIndex[n,t]/.Table[t[i]->3,{i,1,n}],{n,1,28}],1] (* Geoffrey Critzer, Sep 16 2011 *)
mx=40;CoefficientList[Series[1-Sum[EulerPhi[i] Log[1-3*x^i]/i,{i,1,mx}],{x,0,mx}],x] (* Herbert Kociemba, Nov 01 2016 *)
k=3; Prepend[Table[DivisorSum[n, EulerPhi[#] k^(n/#) &]/n, {n, 1, 30}], 1] (* Robert A. Russell, Sep 21 2018 *)
-
a(n)=if (n==0, 1, 1/n * sumdiv(n, d, eulerphi(d)*3^(n/d) )); /* Joerg Arndt, Jul 04 2011 */
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
A001868
Number of n-bead necklaces with 4 colors.
Original entry on oeis.org
1, 4, 10, 24, 70, 208, 700, 2344, 8230, 29144, 104968, 381304, 1398500, 5162224, 19175140, 71582944, 268439590, 1010580544, 3817763740, 14467258264, 54975633976, 209430787824, 799645010860, 3059510616424, 11728124734500, 45035996273872, 173215372864600, 667199944815064
Offset: 0
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 162.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 7.112(a).
- T. D. Noe, Table of n, a(n) for n=0..200
- Joscha Diehl, Rosa Preiß, and Jeremy Reizenstein, Conjugation, loop and closure invariants of the iterated-integrals signature, arXiv:2412.19670 [math.RA], 2024. See p. 21.
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
- Yi Hu, Numerical Transfer Matrix Method of Next-nearest-neighbor Ising Models, Master's Thesis, Duke Univ. (2021).
- Yi Hu and Patrick Charbonneau, Numerical transfer matrix study of frustrated next-nearest-neighbor Ising models on square lattices, arXiv:2106.08442 [cond-mat.stat-mech], 2021.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 4
- Juhani Karhumäki, S. Puzynina, M. Rao, and M. A. Whiteland, On cardinalities of k-abelian equivalence classes, arXiv preprint arXiv:1605.03319 [math.CO], 2016.
- J. Riordan, Letter to N. J. A. Sloane, Jul. 1978
- Index entries for sequences related to necklaces
-
A001868 := proc(n) local d,s; if n = 0 then RETURN(1); else s := 0; for d in divisors(n) do s := s+phi(d)*4^(n/d); od; RETURN(s/n); fi; end;
-
a[n_] := (1/n)*Total[ EulerPhi[#]*4^(n/#) & /@ Divisors[n]]; a[0] = 1; Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Oct 21 2011 *)
mx=40;CoefficientList[Series[1-Sum[EulerPhi[i] Log[1-4*x^i]/i,{i,1,mx}],{x,0,mx}],x] (* Herbert Kociemba, Nov 01 2016 *)
k=4; Prepend[Table[DivisorSum[n, EulerPhi[#] k^(n/#) &]/n, {n, 1, 30}], 1] (* Robert A. Russell, Sep 21 2018 *)
-
a(n) = if (n, sumdiv(n, d, eulerphi(d)*4^(n/d))/n, 1); \\ Michel Marcus, Nov 01 2016
A027671
Number of necklaces with n beads of 3 colors, allowing turning over.
Original entry on oeis.org
1, 3, 6, 10, 21, 39, 92, 198, 498, 1219, 3210, 8418, 22913, 62415, 173088, 481598, 1351983, 3808083, 10781954, 30615354, 87230157, 249144711, 713387076, 2046856566, 5884491500, 16946569371, 48883660146, 141217160458, 408519019449, 1183289542815
Offset: 0
For n=2, the six bracelets are AA, AB, AC, BB, BC, and CC. - _Robert A. Russell_, Sep 24 2018
- J. L. Fisher, Application-Oriented Algebra (1977), ISBN 0-7002-2504-8, circa p. 215.
- M. Gardner, "New Mathematical Diversions from Scientific American" (Simon and Schuster, New York, 1966), pp. 245-246.
- T. D. Noe, Table of n, a(n) for n = 0..200
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
- 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]
- M. Taniguchi, H. Du, and J. S. Lindsey, Enumeration of virtual libraries of combinatorial modular macrocyclic (bracelet, necklace) architectures and their linear counterparts, Journal of Chemical Information and Modeling, 53 (2013), 2203-2216.
- R. M. Thompson and R. T. Downs, Systematic generation of all nonequivalent closest-packed stacking sequences of length N using group theory, Acta Cryst. B57 (2001), 766-771; B58 (2002), 153.
- Eric Weisstein's World of Mathematics, Necklace.
- Index entries for sequences related to bracelets
-
Needs["Combinatorica`"]; Join[{1}, Table[CycleIndex[DihedralGroup[n], s]/.Table[s[i]->3, {i,1,n}], {n,1,30}]] (* Geoffrey Critzer, Sep 29 2012 *)
Needs["Combinatorica`"]; Join[{1}, Table[NumberOfNecklaces[n, 3, Dihedral], {n, 30}]] (* T. D. Noe, Oct 02 2012 *)
mx=40;CoefficientList[Series[(1-Sum[ EulerPhi[n]*Log[1-3*x^n]/n,{n,mx}]+(1+3 x+3 x^2)/(1-3 x^2))/2,{x,0,mx}],x] (* Herbert Kociemba, Nov 02 2016 *)
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)]); a[0] = 1; a[n_] := t[n, 3]; Array[a, 30, 0] (* Jean-François Alcover, Nov 02 2017, after Maple code for A081720 *)
k=3; Prepend[Table[DivisorSum[n, EulerPhi[#] k^(n/#) &]/(2n) + (k^Floor[(n+1)/2] + k^Ceiling[(n+1)/2])/4, {n, 1, 30}], 1] (* Robert A. Russell, Sep 24 2018 *)
-
a(n,k=3) = if(n==0,1,(k^floor((n+1)/2) + k^ceil((n+1)/2))/4 + (1/(2*n))* sumdiv(n, d, eulerphi(d)*k^(n/d) ) );
vector(55,n,a(n-1)) \\ Joerg Arndt, Oct 20 2019
A087854
Triangle read by rows: T(n,k) is the number of n-bead necklaces with exactly k different colored beads.
Original entry on oeis.org
1, 1, 1, 1, 2, 2, 1, 4, 9, 6, 1, 6, 30, 48, 24, 1, 12, 91, 260, 300, 120, 1, 18, 258, 1200, 2400, 2160, 720, 1, 34, 729, 5106, 15750, 23940, 17640, 5040, 1, 58, 2018, 20720, 92680, 211680, 258720, 161280, 40320, 1, 106, 5613, 81876, 510312, 1643544, 2963520, 3024000, 1632960, 362880
Offset: 1
The triangle begins with T(1,1):
1;
1, 1;
1, 2, 2;
1, 4, 9, 6;
1, 6, 30, 48, 24;
1, 12, 91, 260, 300, 120;
1, 18, 258, 1200, 2400, 2160, 720;
1, 34, 729, 5106, 15750, 23940, 17640, 5040;
1, 58, 2018, 20720, 92680, 211680, 258720, 161280, 40320;
1, 106, 5613, 81876, 510312, 1643544, 2963520, 3024000, 1632960, 362880;
...
For T(4,2) = 4, the necklaces are AAAB, AABB, ABAB, and ABBB.
For T(4,4) = 6, the necklaces are ABCD, ABDC, ACBD, ACDB, ADBC, and ADCB.
-
with(numtheory):
T:= (n, k)-> (k!/n) *add(phi(d) *Stirling2(n/d, k), d=divisors(n)):
seq(seq(T(n,k), k=1..n), n=1..12); # Alois P. Heinz, Jun 19 2013
-
Table[Table[Sum[EulerPhi[d]*StirlingS2[n/d,k]k!,{d,Divisors[n]}]/n,{k,1,n}],{n,1,10}]//Grid (* Geoffrey Critzer, Jun 18 2013 *)
-
T(n, k) = (k!/n) * sumdiv(n, d, eulerphi(d) * stirling(n/d, k, 2)); \\ Joerg Arndt, Sep 25 2020
A001869
Number of n-bead necklaces with 5 colors.
Original entry on oeis.org
1, 5, 15, 45, 165, 629, 2635, 11165, 48915, 217045, 976887, 4438925, 20346485, 93900245, 435970995, 2034505661, 9536767665, 44878791365, 211927736135, 1003867701485, 4768372070757, 22706531350485, 108372083629275, 518301258916445
Offset: 0
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 162.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 7.112(a).
- T. D. Noe, Table of n, a(n) for n=0..200
- Joscha Diehl, Rosa Preiß, and Jeremy Reizenstein, Conjugation, loop and closure invariants of the iterated-integrals signature, arXiv:2412.19670 [math.RA], 2024. See p. 21.
- E. N. Gilbert and J. Riordan, Symmetry types of periodic sequences, Illinois J. Math., 5 (1961), 657-665.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 5
- Juhani Karhumäki, S. Puzynina, M. Rao, and M. A. Whiteland, On cardinalities of k-abelian equivalence classes, arXiv preprint arXiv:1605.03319 [math.CO], 2016.
- J. Riordan, Letter to N. J. A. Sloane, Jul. 1978
- Eric Weisstein's World of Mathematics, Necklace.
- Index entries for sequences related to necklaces
-
CoefficientList[Series[1-Sum[EulerPhi[i] Log[1-5*x^i]/i,{i,1,mx}],{x,0,mx}],x] (* Herbert Kociemba, Nov 01 2016 *)
k=5; Prepend[Table[DivisorSum[n, EulerPhi[#] k^(n/#) &]/n, {n, 1, 30}], 1] (* Robert A. Russell, Sep 21 2018 *)
-
a(n) = if (n, sumdiv(n, d, eulerphi(d)*5^(n/d))/n, 1); \\ Michel Marcus, Nov 01 2016
A032275
Number of bracelets (turnover necklaces) of n beads of 4 colors.
Original entry on oeis.org
4, 10, 20, 55, 136, 430, 1300, 4435, 15084, 53764, 192700, 704370, 2589304, 9608050, 35824240, 134301715, 505421344, 1909209550, 7234153420, 27489127708, 104717491064, 399827748310, 1529763696820
Offset: 1
For n=2, the ten bracelets are AA, AB, AC, AD, BB, BC, BD, CC, CD, and DD. - _Robert A. Russell_, Sep 24 2018
- C. G. Bower, Transforms (2)
- 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]
- M. Taniguchi, H. Du, and J. S. Lindsey, Enumeration of virtual libraries of combinatorial modular macrocyclic (bracelet, necklace) architectures and their linear counterparts, Journal of Chemical Information and Modeling, 53 (2013), 2203-2216.
- Index entries for sequences related to bracelets
-
mx=40;CoefficientList[Series[(1-Sum[ EulerPhi[n]*Log[1-4*x^n]/n,{n,mx}]+(1+4 x+6 x^2)/(1-4 x^2))/2,{x,0,mx}],x] (* Herbert Kociemba, Nov 02 2016 *)
k=4; Table[DivisorSum[n, EulerPhi[#] k^(n/#) &]/(2n) + (k^Floor[(n+1)/2] + k^Ceiling[(n+1)/2])/4, {n, 1, 30}] (* Robert A. Russell, Sep 24 2018 *)
Showing 1-10 of 32 results.
Comments