cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 18 results. Next

A081722 Row sums of triangle in A081720.

Original entry on oeis.org

1, 4, 15, 83, 561, 6332, 88086, 1561008, 31966485, 746278033, 19441692751, 559268543516, 17599832876941, 601468320356528, 22182618618501188, 878172760660077348, 37144096971415045713, 1671734397769302244110, 79770632874353931073165, 4022719642533206402716726
Offset: 1

Views

Author

N. J. A. Sloane, based on information supplied by Gary W. Adamson, Apr 05 2003

Keywords

Programs

  • Mathematica
    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[n_] := Sum[t[n, k], {k, 1, n}]; Array[a, 20] (* Jean-François Alcover, Nov 02 2017, after Maple code for A081720 *)

A000029 Number of necklaces with n beads of 2 colors, allowing turning over (these are also called bracelets).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 13, 18, 30, 46, 78, 126, 224, 380, 687, 1224, 2250, 4112, 7685, 14310, 27012, 50964, 96909, 184410, 352698, 675188, 1296858, 2493726, 4806078, 9272780, 17920860, 34669602, 67159050, 130216124, 252745368, 490984488, 954637558, 1857545300
Offset: 0

Views

Author

Keywords

Comments

"Necklaces with turning over allowed" are usually called bracelets. - Joerg Arndt, Jun 10 2016

Examples

			For n=2, the three bracelets are AA, AB, and BB. For n=3, the four bracelets are AAA, AAB, ABB, and BBB. - _Robert A. Russell_, Sep 24 2018
		

References

  • J. L. Fisher, Application-Oriented Algebra (1977), ISBN 0-7002-2504-8, circa p. 215.
  • Martin Gardner, "New Mathematical Diversions from Scientific American" (Simon and Schuster, New York, 1966), pages 245-246.
  • 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).
  • N. Zagaglia Salvi, Ordered partitions and colourings of cycles and necklaces, Bull. Inst. Combin. Appl., 27 (1999), 37-40.

Crossrefs

Row sums of triangle in A052307, second column of A081720, column 2 of A051137.
Cf. A000011, A000013, A000031 (turning over not allowed), A001371 (primitive necklaces), A059076, A164090.

Programs

  • Maple
    with(numtheory): A000029 := proc(n) local d,s; if n = 0 then return 1 else if n mod 2 = 1 then s := 2^((n-1)/2) else s := 2^(n/2-2)+2^(n/2-1) fi; for d in divisors(n) do s := s+phi(d)*2^(n/d)/(2*n) od; return s; fi end:
  • Mathematica
    a[0] := 1; a[n_] := Fold[#1 + EulerPhi[#2]2^(n/#2)/(2n) &, If[OddQ[n], 2^((n - 1)/2), 2^(n/2 - 1) + 2^(n/2 - 2)], Divisors[n]]
    mx=40;CoefficientList[Series[(1-Sum[ EulerPhi[n]*Log[1-2*x^n]/n,{n,mx}]+(1+x)^2/(1-2*x^2))/2,{x,0,mx}],x] (* Herbert Kociemba, Nov 02 2016 *)
    a[0] = 1; a[n_] := (1/4)*(Mod[n, 2] + 3)*2^Quotient[n, 2] + DivisorSum[n, EulerPhi[#]*2^(n/#)&]/(2*n); Array[a, 36, 0] (* Jean-François Alcover, Nov 05 2017 *)
  • PARI
    a(n)=if(n<1,!n,(n%2+3)/4*2^(n\2)+sumdiv(n,d,eulerphi(n/d)*2^d)/2/n)
    
  • Python
    from sympy import divisors, totient
    def a(n):
        return 1 if n<1 else ((2**(n//2+1) if n%2 else 3*2**(n//2-1)) + sum(totient(n//d)*2**d for d in divisors(n))//n)//2
    print([a(n) for n in range(51)]) # Indranil Ghosh, Apr 23 2017

Formula

a(n) = Sum_{d divides n} phi(d)*2^(n/d)/(2*n) + either 2^((n - 1)/2) if n odd or 2^(n/2 - 1) + 2^(n/2 - 2) if n even.
G.f.: (1 - Sum_{n>=1} phi(n)*log(1 - 2*x^n)/n + (1 + x)^2/(1 - 2*x^2))/2. - Herbert Kociemba, Nov 02 2016
Equals (A000031 + A164090) / 2 = A000031 - A059076 = A059076 + A164090. - Robert A. Russell, Sep 24 2018
From Richard L. Ollerton, May 04 2021: (Start)
a(0) = 1; a(n) = Sum_{k=1..n} 2^gcd(n,k)/(2*n) + either 2^((n - 1)/2) if n odd or 2^(n/2 - 1) + 2^(n/2 - 2) if n even.
a(0) = 1; a(n) = A000031(n)/2 + (2^floor((n+1)/2) + 2^ceiling((n+1)/2))/4. See A051137. (End)

Extensions

More terms from Christian G. Bower

A152176 Triangle read by rows: T(n,k) is the number of k-block partitions of an n-set up to rotations and reflections.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 3, 5, 2, 1, 1, 7, 14, 11, 3, 1, 1, 8, 31, 33, 16, 3, 1, 1, 17, 82, 137, 85, 27, 4, 1, 1, 22, 202, 478, 434, 171, 37, 4, 1, 1, 43, 538, 1851, 2271, 1249, 338, 54, 5, 1, 1, 62, 1401, 6845, 11530, 8389, 3056, 590, 70, 5, 1, 1, 121, 3838, 26148
Offset: 1

Views

Author

Vladeta Jovovic, Nov 27 2008

Keywords

Comments

Number of bracelet structures of length n using exactly k different colored beads. Turning over will not create a new bracelet. Permuting the colors of the beads will not change the structure. - Andrew Howroyd, Apr 06 2017
The number of achiral structures (A) is given in A140735 (odd n) and A293181 (even n). The number of achiral structures plus twice the number of chiral pairs (A+2C) is given in A152175. These can be used to determine A+C by taking half their average, as is done in the Mathematica program. - Robert A. Russell, Feb 24 2018
T(n,k)=pi_k(C_n) which is the number of non-equivalent partitions of the cycle on n vertices, with exactly k parts. Two partitions P1 and P2 of a graph G are said to be equivalent if there is a nontrivial automorphism of G which maps P1 onto P2. - Mohammad Hadi Shekarriz, Aug 21 2019

Examples

			Triangle begins:
  1;
  1,  1;
  1,  1,   1;
  1,  3,   2,    1;
  1,  3,   5,    2,    1;
  1,  7,  14,   11,    3,    1;
  1,  8,  31,   33,   16,    3,   1;
  1, 17,  82,  137,   85,   27,   4,  1;
  1, 22, 202,  478,  434,  171,  37,  4, 1;
  1, 43, 538, 1851, 2271, 1249, 338, 54, 5, 1;
  ...
		

References

  • 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]

Crossrefs

Columns 2-6 are A056357, A056358, A056359, A056360, A056361.
Row sums are A084708.
Partial row sums include A000011, A056353, A056354, A056355, A056356.
Cf. A081720, A273891, A008277 (set partitions), A284949 (up to reflection), A152175 (up to rotation).

Programs

  • Mathematica
    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]];
    Ach[n_, k_] := Ach[n, k] = Switch[k, 0, If[0==n, 1, 0], 1, If[n>0, 1, 0],
      (* else *) _, If[OddQ[n], Sum[Binomial[(n-1)/2, i] Ach[n-1-2i, k-1],
      {i, 0, (n-1)/2}], Sum[Binomial[n/2-1, i] (Ach[n-2-2i, k-1]
      + 2^i Ach[n-2-2i, k-2]), {i, 0, n/2-1}]]] (* achiral loops of length n, k colors *)
    Table[(CoefficientList[DivisorSum[n, EulerPhi[#] Adn[#, n/#] &]/(x n), x]
    + Table[Ach[n, k],{k,1,n}])/2, {n, 1, 20}] // Flatten (* Robert A. Russell, Feb 24 2018 *)
  • PARI
    \\ see A056391 for Polya enumeration functions
    T(n,k) = NonequivalentStructsExactly(DihedralPerms(n), k); \\ Andrew Howroyd, Oct 14 2017
    
  • PARI
    \\ Ach is A304972 and R is A152175 as square matrices.
    Ach(n)={my(M=matrix(n, n, i, k, i>=k)); for(i=3, n, for(k=2, n, M[i, k]=k*M[i-2, k] + M[i-2, k-1] + if(k>2, M[i-2, k-2]))); M}
    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))]))}
    T(n)={(R(n) + Ach(n))/2}
    { my(A=T(12)); for(n=1, #A, print(A[n, 1..n])) } \\ Andrew Howroyd, Sep 20 2019

A081721 Number of bracelets of n beads in up to n colors.

Original entry on oeis.org

1, 3, 10, 55, 377, 4291, 60028, 1058058, 21552969, 500280022, 12969598086, 371514016094, 11649073935505, 396857785692525, 14596464294191704, 576460770691256356, 24330595997127372497, 1092955780817066765469, 52063675152021153895330, 2621440000054016000176044
Offset: 1

Views

Author

N. J. A. Sloane, based on information supplied by Gary W. Adamson, Apr 05 2003

Keywords

Comments

T(n,n), T given in A081720.
From Olivier Gérard, Aug 01 2016: (Start)
Number of classes of functions of [n] to [n] under rotation and reversal.
.
Classes can be of size between 1 and 2n
depending on divisibility properties of n.
.
n 1 2 3 4 5 n 2n
----------------------------------------
1 1
2 2 1
3 3 0 6 1
4 4 6 0 30 15
5 5 0 0 120 252
6 6 15 30 725 3515
7 7 0 0 2394 57627
.
(End)

Crossrefs

Cf. A000312 All endofunctions
Cf. A000169 Classes under translation mod n
Cf. A001700 Classes under sort
Cf. A056665 Classes under rotation
Cf. A168658 Classes under complement to n+1
Cf. A130293 Classes under translation and rotation
Cf. A275549 Classes under 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
Row sums of partition array A213941.
Main diagonal of A321791.

Programs

  • Mathematica
    Table[CycleIndex[DihedralGroup[n],s]/.Table[s[i]->n,{i,1,n}],{n,1,20}] (* Geoffrey Critzer, Jun 18 2013 *)
    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[n_] := t[n, n]; Array[a, 20] (* Jean-François Alcover, Nov 02 2017, after Maple code for A081720 *)

Formula

a(n) ~ n^(n-1) / 2. - Vaclav Kotesovec, Mar 18 2017

Extensions

Name changed by Olivier Gérard, Aug 05 2016
Name revised by Álvar Ibeas, Apr 20 2018

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

Views

Author

Keywords

Comments

Number of bracelets of n beads using up to three different colors. - Robert A. Russell, Sep 24 2018

Examples

			For n=2, the six bracelets are AA, AB, AC, BB, BC, and CC. - _Robert A. Russell_, Sep 24 2018
		

References

  • 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.

Crossrefs

a(n) = A081720(n,3), n >= 3. - Wolfdieter Lang, Jun 03 2012
Column 3 of A051137.
a(n) = A278639(n) + A182751(n+1).
Equals A001867 - A278639.

Programs

  • Mathematica
    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 *)
  • PARI
    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

Formula

G.f.: (1 - Sum_{n>=1} phi(n)*log(1 - 3*x^n)/n + (1+3*x+3*x^2)/(1-3*x^2))/2. - Herbert Kociemba, Nov 02 2016
For n > 0, a(n) = (k^floor((n+1)/2) + k^ceiling((n+1)/2))/4 + (1/(2*n))* Sum_{d|n} phi(d)*k^(n/d), where k=3 is the maximum number of colors. - Robert A. Russell, Sep 24 2018
a(0) = 1; a(n) = (k^floor((n+1)/2) + k^ceiling((n+1)/2))/4 + (1/(2*n))*Sum_{i=1..n} k^gcd(n,i), where k=3 is the maximum number of colors.
(See A075195 formulas.) - Richard L. Ollerton, May 04 2021
2*a(n) = A182751(n+1) + A001867(n), n>0.

Extensions

More terms from Christian G. Bower

A130293 Number of necklaces of n beads with up to n colors, with cyclic permutation {1,..,n} of the colors taken to be equivalent.

Original entry on oeis.org

1, 2, 5, 20, 129, 1316, 16813, 262284, 4783029, 100002024, 2357947701, 61917406672, 1792160394049, 56693913450992, 1946195068379933, 72057594071484456, 2862423051509815809, 121439531097819321972, 5480386857784802185957, 262144000000051200072048, 13248496640331026150086281
Offset: 1

Views

Author

Wouter Meeussen, Aug 06 2007, Aug 14 2007

Keywords

Comments

From Olivier Gérard, Aug 01 2016: (Start)
Equivalent to the definition: number of classes of endofunctions of [n] under rotation and translation mod n.
Classes can be of size between n and n^2 depending on divisibility properties of n.
n n 2n 3n ... n^2
--------------------------
1 1
2 2
3 3 2
4 4 2 14
5 5 0 124
6 6 6 22 1282
7 7 0 16806
For prime n, the only possible class sizes are n and n^2, the classes of size n are the n arithmetical progression modulo n so #(c-n)=n, #(c-n^2)=(n^n - n*n)/n^2 = n^(n-2)-1 and a(n) = n^(n-2)+n-1.
(End)

Examples

			The 5 necklaces for n=3 are: 000, 001, 002, 012 and 021.
		

Crossrefs

Cf. A081720.
Cf. A000312: All endofunctions.
Cf. A000169: Classes under translation mod n.
Cf. A001700: Classes under sort.
Cf. A056665: Classes under rotation.
Cf. A168658: Classes under complement to n+1.
Cf. A130293: Classes under translation and rotation.
Cf. A081721: Classes under rotation and reversal.
Cf. A275549: Classes under 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.

Programs

  • Mathematica
    tor8={};ru8=Thread[ i_ ->Table[ Mod[i+k,8],{k,8}]];Do[idi=IntegerDigits[k,8,8];try= Function[w, First[temp=Union[Join @@(Table[RotateRight[w,k],{k,8}]/.#&)/@ ru8]]][idi];If[idi===try, tor8=Flatten[ {tor8,{{Length[temp],idi}}},1] ],{k,0,8^8-1}];
    a[n_]:=Sum[d EulerPhi[d]n^(n/d),{d,Divisors[n]}]/n^2; Array[a,21] (* Stefano Spezia, May 21 2024 *)
  • PARI
    a(n) = sumdiv(n, d, d*eulerphi(d)*n^(n/d))/n^2; \\ Michel Marcus, Aug 05 2016

Formula

a(n) = (1/n^2)*Sum_{d|n} d*phi(d)*n^(n/d). - Vladeta Jovovic, Aug 14 2007, Aug 24 2007

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

Views

Author

Marko Riedel, Jun 02 2016

Keywords

Comments

For bracelets, chiral pairs are counted as one.

Examples

			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
		

Crossrefs

Row sums give A019537.
Cf. A087854 (oriented), A305540 (achiral), A305541 (chiral).

Programs

  • Mathematica
    (* 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 *)

Formula

T(n,k) = Sum_{i=0..k-1} (-1)^i * binomial(k,i) * A081720(n,k-i). - Andrew Howroyd, Mar 25 2017
From Robert A. Russell, Sep 26 2018: (Start)
T(n,k) = (k!/4) * (S2(floor((n+1)/2),k) + S2(ceiling((n+1)/2),k)) + (k!/2n) * Sum_{d|n} phi(d) * S2(n/d,k), where S2 is the Stirling subset number A008277.
G.f. for column k>1: (k!/4) * x^(2k-2) * (1+x)^2 / Product_{i=1..k} (1-i x^2) - Sum_{d>0} (phi(d)/2d) * Sum_{j} (-1)^(k-j) * C(k,j) * log(1-j*x^d).
T(n,k) = (A087854(n,k) + A305540(n,k)) / 2 = A087854(n,k) - A305541(n,k) = A305541(n,k) + A305540(n,k).
(End)

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

Views

Author

Keywords

Examples

			For n=2, the ten bracelets are AA, AB, AC, AD, BB, BC, BD, CC, CD, and DD. - _Robert A. Russell_, Sep 24 2018
		

Crossrefs

Column 4 of A051137.

Programs

  • Mathematica
    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 *)

Formula

"DIK" (bracelet, indistinct, unlabeled) transform of 4, 0, 0, 0, ...
Equals (A001868(n) + A056486(n)) / 2 = A001868(n) - A278640(n) = A278640(n) + A056486(n), for n>=1.
a(n) = A081720(n,4), n >= 4. - Wolfdieter Lang, Jun 03 2012
G.f.: (1 - Sum_{n>=1} phi(n)*log(1 - 4*x^n)/n + (1+4*x+6*x^2)/(1-4*x^2))/2. - Herbert Kociemba, Nov 02 2016
a(n) = (k^floor((n+1)/2) + k^ceiling((n+1)/2))/4 + (1/(2*n))* Sum_{d|n} phi(d)*k^(n/d), where k=4 is the maximum number of colors. - Robert A. Russell, Sep 24 2018
a(n) = (k^floor((n+1)/2) + k^ceiling((n+1)/2))/4 + (1/(2*n))*Sum_{i=1..n} k^gcd(n,i), where k=4 is the maximum number of colors. (See A075195 formulas.) - Richard L. Ollerton, May 04 2021

A284855 Array read by antidiagonals: T(n,k) = number of necklaces with n beads and k colors that are the same when turned over.

Original entry on oeis.org

1, 2, 1, 3, 3, 1, 4, 6, 4, 1, 5, 10, 9, 6, 1, 6, 15, 16, 18, 8, 1, 7, 21, 25, 40, 27, 12, 1, 8, 28, 36, 75, 64, 54, 16, 1, 9, 36, 49, 126, 125, 160, 81, 24, 1, 10, 45, 64, 196, 216, 375, 256, 162, 32, 1, 11, 55, 81, 288, 343, 756, 625, 640, 243, 48, 1
Offset: 1

Views

Author

Andrew Howroyd, Apr 04 2017

Keywords

Comments

Number of periodic palindromes of length n using a maximum of k different symbols.
From Petros Hadjicostas, Sep 02 2018: (Start)
According to Christian Bower's theory of transforms, we have boxes of different sizes and different colors. The size of a box is determined by the number of balls it can hold. In this case, we assume all balls are the same and are unlabeled. Assume also that the number of possible colors a box with m balls can have is given by c(m). We place the boxes on a circle at equal distances from each other. Two configurations of boxes on the circle are considered equivalent if one can be obtained from the other by rotation. We are interested about circular configurations of boxes that are circular palindromes (i.e., necklaces with boxes that are the same when turned over). Let b(n) be the number of circularly palindromic configurations of boxes on a circle when the total number of balls in the boxes is n (and each box contains at least one ball).
Bower calls the sequence (b(n): n >= 1), the CPAL ("circular palindrome") transform of the input sequence (c(m): m >= 1). If the g.f. of the input sequence (c(m): m >= 1) is C(x) = Sum_{m>=1} c(m)*x^m, then the g.f. of the output sequence (b(n): n >= 1) is B(x) = Sum_{n >= 1} b(n)*x^n = (1 + C(x))^2/(2*(1 - C(x^2))) - 1/2.
In the current sequence, each box holds only one ball but can have one of k colors. Hence, c(1) = k but c(m) = 0 for m >= 2. Thus, C(x) = k*x. Then, for fixed k, the output sequence is (b(n): n >= 1) = (T(n, k): n >= 1), where T(n, k) = number of necklaces with n beads and k colors that are the same when turned over. If we let B_k(x) = Sum_{n>=1} T(n, k)*x^n, then B_k(x) = (1 + k*x)^2/(2*(1 - k*x^2)) - 1/2. From this, we can easily prove the formulae below.
Note that T(n, k=2) - 1 is the total number of Sommerville symmetric cyclic compositions of n. See pp. 301-304 in his paper in the links below. To see why this is the case, we use MacMahon's method of representing a cyclic composition of n with a necklace of 2 colors (see p. 273 in Sommerville's paper where the two "colors" are an x and a dot . rather than B and W). Given a Sommerville symmetrical composition b_1 + ... + b_r of n (with b_i >= 1 for all i and 1 <= r <= n), create the following circularly palindromic necklace with n beads of 2 colors: Start with a B bead somewhere on the circle and place b_1 - 1 W beads to the right of it; place a B bead to the right of the W beads (if any) followed by b_2 - 1 W beads; and so on. At the end, place a B bead followed with b_r - 1 W beads. (If b_i = 1 for some i, then a B bead follows a B bead since there are 0 W beads between them.) We thus get a circularly palindromic necklace with n beads of two colors. (The only necklace we cannot get with this method is the one than has all n beads colored W.)
It is interesting that the representation of a necklace of length n, say s_1, s_2, ..., s_n, as a periodic sequence (..., s_{-2}, s_{-1}, s_0, s_1, s_2, ...) with the property s_i = s_{i+n} for all i, as was done by Marks R. Nester in Chapter 2 of his 1999 PhD thesis, was considered by Sommerville in his 1909 paper (in the very first paragraph of his paper). (End)

Examples

			Table starts:
1  2   3    4    5     6     7      8      9     10 ...
1  3   6   10   15    21    28     36     45     55 ...
1  4   9   16   25    36    49     64     81    100 ...
1  6  18   40   75   126   196    288    405    550 ...
1  8  27   64  125   216   343    512    729   1000 ...
1 12  54  160  375   756  1372   2304   3645   5500 ...
1 16  81  256  625  1296  2401   4096   6561  10000 ...
1 24 162  640 1875  4536  9604  18432  32805  55000 ...
1 32 243 1024 3125  7776 16807  32768  59049 100000 ...
1 48 486 2560 9375 27216 67228 147456 295245 550000 ...
...
For n = 4 and k = 2, the palindromic necklaces are 0000, 0001, 0011, 0111, 0101, 1111 so T(4,2) = 6. Necklaces are only counted up to cyclic equivalence.
For n = 4 and k = 2, using MacMahon's bijection, with B = 0 and W = 1, the corresponding Sommerville symmetrical cyclic compositions of n = 4 are as follows: 1+1+1+1, 1+1+2, 1+3, 4, 2+2 (with none for 1111). If we let B = 1 and W = 0, we get the corresponding symmetrical cyclic compositions of n=4: (none for 0000) 4, 1+3, 1+1+2, 2+2, 1+1+1+1. (All these cyclic compositions must viewed on a circle.) - _Petros Hadjicostas_, Sep 02 2018
		

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for the pdf file of Chap. 2]

Crossrefs

Programs

  • Mathematica
    a[n_, k_] := If[EvenQ[n], (k^(n/2) + k^(n/2 + 1))/2, k^((n+1)/2)];
    Table[a[n-k+1, k], {n, 1, 11}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jun 05 2017, translated from PARI *)
  • PARI
    a(n,k) = if(n % 2 == 0, (k^(n/2) + k^(n/2+1))/2, k^((n+1)/2));
    for(n=1, 10, for(k=1, 10, print1( a(n,k),", ");); print(););

Formula

T(2*n, k) = (k^(n+1) + k^n) / 2.
T(2*n + 1, k) = k^(n+1).
T(n, k) = 2 * A081720(n, k) - A075195(n, k).
From Petros Hadjicostas, Sep 02 2018: (Start)
For fixed k >= 1, the k-th column (T(n, k): n >= 1) is the CPAL ("circular palindrome") transform of the sequence k, 0, 0, ...
G.f. of column k: Sum_{n>=1} T(n,k)*x^n = (1 + k*x)^2/(2*(1 - k*x^2)) - 1/2. (End)

A293496 Array read by antidiagonals: T(n,k) = number of chiral pairs of necklaces with n beads using a maximum of k colors.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 4, 3, 0, 0, 0, 0, 10, 15, 12, 1, 0, 0, 0, 20, 45, 72, 38, 2, 0, 0, 0, 35, 105, 252, 270, 117, 6, 0, 0, 0, 56, 210, 672, 1130, 1044, 336, 14, 0, 0, 0, 84, 378, 1512, 3535, 5270, 3795, 976, 30, 0
Offset: 1

Views

Author

Andrew Howroyd, Oct 10 2017

Keywords

Comments

An orientable necklace when turned over does not leave it unchanged. Only one necklace in each pair is included in the count.
The number of chiral bracelets. An achiral bracelet is the same as its reverse, while a chiral bracelet is equivalent to its reverse. - Robert A. Russell, Sep 28 2018

Examples

			Array begins:
  ==========================================================
  n\k | 1  2    3     4      5       6        7        8
  ----+-----------------------------------------------------
   1  | 0  0    0     0      0       0        0        0 ...
   2  | 0  0    0     0      0       0        0        0 ...
   3  | 0  0    1     4     10      20       35       56 ...
   4  | 0  0    3    15     45     105      210      378 ...
   5  | 0  0   12    72    252     672     1512     3024 ...
   6  | 0  1   38   270   1130    3535     9156    20748 ...
   7  | 0  2  117  1044   5270   19350    57627   147752 ...
   8  | 0  6  336  3795  23520  102795   355656  1039626 ...
   9  | 0 14  976 14060 106960  556010  2233504  7440216 ...
  10  | 0 30 2724 51204 483756 3010098 14091000 53615016 ...
  ...
For T(3,4)=4, the chiral pairs are ABC-ACB, ABD-ADB, ACD-ADC, and BCD-BDC.
For T(4,3)=3, the chiral pairs are AABC-AACB, ABBC-ACBB, and ABCC-ACCB. - _Robert A. Russell_, Sep 28 2018
		

Crossrefs

Programs

  • Mathematica
    b[n_, k_] := (1/n)*DivisorSum[n, EulerPhi[#]*k^(n/#) &];
    c[n_, k_] := If[EvenQ[n], (k^(n/2) + k^(n/2 + 1))/2, k^((n + 1)/2)];
    T[, 1] = T[1, ] = 0; T[n_, k_] := (b[n, k] - c[n, k])/2;
    Table[T[n - k + 1, k], {n, 1, 11}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Oct 11 2017, translated from PARI *)
  • PARI
    \\ here b(n,k) is A075195 and c(n,k) is A284855
    b(n, k) = (1/n) * sumdiv(n, d, eulerphi(d)*k^(n/d));
    c(n, k) = if(n % 2 == 0, (k^(n/2) + k^(n/2+1))/2, k^((n+1)/2));
    T(n, k) = (b(n, k) - c(n, k)) / 2;

Formula

T(n,k) = (A075195(n,k) - A284855(n,k)) / 2.
From Robert A. Russell, Sep 28 2018: (Start)
T(n, k) = -(k^floor((n+1)/2) + k^ceiling((n+1)/2)) / 4 + (1/2n) * Sum_{d|n} phi(d) * k^(n/d)
G.f. for column k: -(kx/4)*(kx+x+2)/(1-kx^2) - Sum_{d>0} phi(d)*log(1-kx^d)/2d. (End)
Showing 1-10 of 18 results. Next