%I #128 Sep 15 2024 14:41:15
%S 1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,2,2,1,1,1,1,3,3,3,1,1,1,1,3,4,4,3,
%T 1,1,1,1,4,5,8,5,4,1,1,1,1,4,7,10,10,7,4,1,1,1,1,5,8,16,16,16,8,5,1,1,
%U 1,1,5,10,20,26,26,20,10,5,1,1,1,1,6,12,29,38,50,38,29,12,6,1,1,1,1,6,14,35,57,76,76,57,35,14,6,1,1
%N Triangle read by rows: T(n,k) = number of bracelets (reversible necklaces) with n beads, k of which are black and n - k are white.
%C Equivalently, T(n,k) is the number of orbits of k-element subsets of the vertices of a regular n-gon under the usual action of the dihedral group D_n, or under the action of Euclidean plane isometries. Note that each row of the table is symmetric and unimodal. - _Austin Shapiro_, Apr 20 2009
%C Also, the number of k-chords in n-tone equal temperament, up to (musical) transposition and inversion. Example: there are 29 tetrachords, 38 pentachords, 50 hexachords in the familiar 12-tone equal temperament. Called "Forte set-classes," after Allen Forte who first cataloged them. - _Jon Wild_, May 21 2004
%D Martin Gardner, "New Mathematical Diversions from Scientific American" (Simon and Schuster, New York, 1966), pages 245-246.
%D N. Zagaglia Salvi, Ordered partitions and colourings of cycles and necklaces, Bull. Inst. Combin. Appl., 27 (1999), 37-40.
%H Washington Bomfim, <a href="/A052307/b052307.txt">Rows n = 0..130, flattened</a>
%H N. J. Fine, <a href="http://projecteuclid.org/euclid.ijm/1255381350">Classes of periodic sequences</a>, Illinois J. Math., 2 (1958), 285-302.
%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 G. Gori, S. Paganelli, A. Sharma, P. Sodano, and A. Trombettoni, <a href="http://arxiv.org/abs/1405.3616">Bell-Paired States Inducing Volume Law for Entanglement Entropy in Fermionic Lattices</a>, arXiv:1405.3616 [cond-mat.stat-mech], 2014. See Section V.
%H H. Gupta, <a href="https://web.archive.org/web/20200806162943/https://www.insa.nic.in/writereaddata/UpLoadedFiles/IJPAM/20005a66_964.pdf">Enumeration of incongruent cyclic k-gons</a>, Indian J. Pure and Appl. Math., 10(8) (1979), 964-999.
%H S. Karim, J. Sawada, Z. Alamgirz, and S. M. Husnine, <a href="https://doi.org/10.1016/j.tcs.2012.11.024">Generating bracelets with fixed content</a>, Theoretical Computer Science, 475 (2013), 103-112.
%H John P. McSorley and Alan H. Schoen, <a href="http://dx.doi.org/10.1016/j.disc.2012.08.021">Rhombic tilings of (n, k)-ovals, (n, k, lambda)-cyclic difference sets, and related topics</a>, Discrete Math., 313 (2013), 129-154. - From _N. J. A. Sloane_, Nov 26 2012
%H A. L. Patterson, <a href="http://dx.doi.org/10.1103/PhysRev.65.195">Ambiguities in the X-Ray Analysis of Crystal Structures</a>, Phys. Rev. 65 (1944), 195 - 201 (see Table I). [From _N. J. A. Sloane_, Mar 14 2009]
%H Richard H. Reis, <a href="https://web.archive.org/web/20200803213425/https://www.insa.nic.in/writereaddata/UpLoadedFiles/IJPAM/20005a66_1000.pdf">A formula for C(T) in Gupta's paper</a>, Indian J. Pure and Appl. Math., 10(8) (1979), 1000-1001.
%H Vladimir Shevelev, <a href="http://www.math.bgu.ac.il/~shevelev/Shevelev_Neclaces.pdf">Necklaces and convex k-gons</a>, Indian J. Pure and Appl. Math., 35(5) (2004), 629-638.
%H Vladimir Shevelev, <a href="https://web.archive.org/web/20200722171019/http://www.insa.nic.in/writereaddata/UpLoadedFiles/IJPAM/2000c4e8_629.pdf">Necklaces and convex k-gons</a>, Indian J. Pure and Appl. Math., 35(5) (2004), 629-638.
%H <a href="/index/Br#bracelets">Index entries for sequences related to bracelets</a>
%F T(0,0) = 1. If n > 0, T(n,k) = binomial(floor(n/2) - (k mod 2) * (1 - (n mod 2)), floor(k/2)) / 2 + Sum_{d|n, d|k} (phi(d)*binomial(n/d, k/d)) / (2*n). - _Washington Bomfim_, Jun 30 2012 [edited by _Petros Hadjicostas_, May 29 2019]
%F From _Freddy Barrera_, Apr 21 2019: (Start)
%F T(n,k) = (1/2) * (A119963(n,k) + A047996(n,k)).
%F T(n,k) = T(n, n-k) for each k < n (Theorem 2 of H. Gupta). (End)
%F G.f. for column k >= 1: (x^k/2) * ((1/k) * Sum_{m|k} phi(m)/(1 - x^m)^(k/m) + (1 + x)/(1 - x^2)^floor((k/2) + 1)). (This formula is due to Herbert Kociemba.) - _Petros Hadjicostas_, May 25 2019
%F Bivariate o.g.f.: Sum_{n,k >= 0} T(n, k)*x^n*y^k = (1/2) * ((x + 1) * (x*y + 1) / (1 - x^2 * (y^2 + 1)) + 1 - Sum_{d >= 1} (phi(d)/d) * log(1 - x^d * (1 + y^d))). - _Petros Hadjicostas_, Jun 13 2019
%e Triangle T(n,k) (with rows n >= 0 and columns k = 0..n) begins:
%e 1;
%e 1, 1;
%e 1, 1, 1;
%e 1, 1, 1, 1;
%e 1, 1, 2, 1, 1;
%e 1, 1, 2, 2, 1, 1;
%e 1, 1, 3, 3, 3, 1, 1;
%e 1, 1, 3, 4, 4, 3, 1, 1;
%e 1, 1, 4, 5, 8, 5, 4, 1, 1;
%e 1, 1, 4, 7, 10, 10, 7, 4, 1, 1;
%e 1, 1, 5, 8, 16, 16, 16, 8, 5, 1, 1;
%e 1, 1, 5, 10, 20, 26, 26, 20, 10, 5, 1, 1;
%e 1, 1, 6, 12, 29, 38, 50, 38, 29, 12, 6, 1, 1;
%e ...
%p A052307 := proc(n,k)
%p local hk,a,d;
%p if k = 0 then
%p return 1 ;
%p end if;
%p hk := k mod 2 ;
%p a := 0 ;
%p for d in numtheory[divisors](igcd(k,n)) do
%p a := a+ numtheory[phi](d)*binomial(n/d-1,k/d-1) ;
%p end do:
%p %/k + binomial(floor((n-hk)/2),floor(k/2)) ;
%p %/2 ;
%p end proc: # _R. J. Mathar_, Sep 04 2011
%t Table[If[m*n===0,1,1/2*If[EvenQ[n], If[EvenQ[m], Binomial[n/2, m/2], Binomial[(n-2)/2, (m-1)/2 ]], If[EvenQ[m], Binomial[(n-1)/2, m/2], Binomial[(n-1)/2, (m-1)/2]]] + 1/2*Fold[ #1 +(EulerPhi[ #2]*Binomial[n/#2, m/#2])/n &, 0, Intersection[Divisors[n], Divisors[m]]]], {n,0,12}, {m,0,n}] (* _Wouter Meeussen_, Aug 05 2002, Jan 19 2009 *)
%o (PARI)
%o B(n,k)={ if(n==0, return(1)); GCD = gcd(n, k); S = 0;
%o for(d = 1, GCD, if((k%d==0)&&(n%d==0), S+=eulerphi(d)*binomial(n/d,k/d)));
%o return (binomial(floor(n/2)- k%2*(1-n%2), floor(k/2))/2 + S/(2*n)); }
%o n=0;k=0; for(L=0, 8645, print(L, " ", B(n,k)); k++; if(k>n, k=0; n++))
%o /* _Washington Bomfim_, Jun 30 2012 */
%o (Python)
%o from sympy import binomial as C, totient, divisors, gcd
%o def T(n, k): return 1 if n==0 else C((n//2) - k%2 * (1 - n%2), (k//2))/2 + sum(totient(d)*C(n//d, k//d) for d in divisors(gcd(n, k)))/(2*n)
%o for n in range(11): print([T(n, k) for k in range(n + 1)]) # _Indranil Ghosh_, Apr 23 2017
%Y Row sums: A000029. Columns 0-12: A000012, A000012, A008619, A001399, A005232, A032279, A005513, A032280, A005514, A032281, A005515, A032282, A005516.
%Y Cf. A047996, A051168, A052308, A052309, A052310.
%K nonn,tabl,nice
%O 0,13
%A _Christian G. Bower_, Nov 15 1999