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.

Previous Showing 41-50 of 54 results. Next

A185158 Triangular array read by rows: T(n,k) (n>=1, 0<=k<=n-1, except 0<=k<=1 when n=1) = coefficient of x^k in expansion of (1/n)*Sum_{d|n} (mobius(d)*(1+x^d)^(n/d)).

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 3, 5, 5, 3, 1, 0, 1, 3, 7, 8, 7, 3, 1, 0, 1, 4, 9, 14, 14, 9, 4, 1, 0, 1, 4, 12, 20, 25, 20, 12, 4, 1, 0, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 0, 1, 5, 18, 40, 66, 75, 66, 40, 18, 5, 1, 0, 1, 6, 22, 55, 99, 132, 132, 99, 55, 22, 6, 1, 0, 1, 6, 26, 70, 143, 212, 245, 212, 143, 70, 26, 6, 1
Offset: 1

Views

Author

N. J. A. Sloane, Jan 23 2012

Keywords

Comments

T(n,k) is the number of binary Lyndon words of length n containing k ones. - Joerg Arndt, Oct 21 2012

Examples

			The first few polynomials are:
1+x
x
x+x^2
x+x^2+x^3
x+2*x^2+2*x^3+x^4
x+2*x^2+3*x^3+2*x^4+x^5
x+3*x^2+5*x^3+5*x^4+3*x^5+x^6
...
The triangle begins:
[ 1]  1, 1,
[ 2]  0, 1,
[ 3]  0, 1, 1,
[ 4]  0, 1, 1, 1,
[ 5]  0, 1, 2, 2, 1,
[ 6]  0, 1, 2, 3, 2, 1,
[ 7]  0, 1, 3, 5, 5, 3, 1,
[ 8]  0, 1, 3, 7, 8, 7, 3, 1,
[ 9]  0, 1, 4, 9, 14, 14, 9, 4, 1,
[10]  0, 1, 4, 12, 20, 25, 20, 12, 4, 1,
[11]  0, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1,
[12]  0, 1, 5, 18, 40, 66, 75, 66, 40, 18, 5, 1,
[13]  0, 1, 6, 22, 55, 99, 132, 132, 99, 55, 22, 6, 1,
[14]  0, 1, 6, 26, 70, 143, 212, 245, 212, 143, 70, 26, 6, 1
...
		

Crossrefs

Two other versions of this triangle are in A051168 and A092964.

Programs

  • Maple
    with(numtheory);
    W:=r->expand((1/r)*add(mobius(d)*(1+x^d)^(r/d), d in divisors(r)));
    for n from 1 to 14 do
    lprint(W(n));
    od:
    for n from 1 to 14 do
    lprint(seriestolist(series(W(n),x,50)));
    od:
  • Mathematica
    T[n_, k_] := DivisorSum[GCD[n, k], MoebiusMu[#] Binomial[n/#, k/#]&]/n; Table[T[n, k], {n, 1, 14}, {k, 0, Max[1, n-1]}] // Flatten (* Jean-François Alcover, Dec 02 2015 *)
  • PARI
    p(n) = if(n<=0, n==0, 'a0 + 1/n * sumdiv(n, d, moebius(d)*(1+x^d)^(n/d) ));
    /* print triangle: */
    for (n=1,17, v=Vec( polrecip(Pol(p(n),x)) ); v[1]-='a0; print(v) );
    /* Joerg Arndt, Oct 21 2012 */
    
  • PARI
    T(n,k) = 1/n * sumdiv(gcd(n,k), d, moebius(d) * binomial(n/d,k/d) );
    /* print triangle: */
    { for (n=1, 17, for (k=0, max(1,n-1), print1(T(n,k),", "); ); print(); ); }
    /* Joerg Arndt, Oct 21 2012 */

Formula

T(n,k) = 1/n * sum( d divides gcd(n,k), mu(d) * C(n/d,k/d) ). - Joerg Arndt, Oct 21 2012
The prime rows are given by (1+x)^p/p, rounding non-integer coefficients to 0, e.g., (1+x)^2/2 = .5 + x + .5 x^2 gives (0,1,0), row 2 below. - Tom Copeland, Oct 21 2014

A338113 Triangle read by rows: T(n,k) is the number of oriented colorings of the faces (and peaks) of a regular n-dimensional simplex using exactly k colors. Row n has C(n+1,3) columns.

Original entry on oeis.org

1, 1, 3, 3, 2, 1, 38, 1080, 14040, 85500, 274104, 493920, 504000, 272160, 60480, 1, 3502, 9743106, 3017318368, 249756082950, 8612276962188, 156010151929968, 1699145259725088, 12107373916276800, 59649257217110400
Offset: 2

Views

Author

Robert A. Russell, Oct 10 2020

Keywords

Comments

An n-dimensional simplex has n+1 vertices, C(n+1,3) faces, and C(n+1,3) peaks, which are (n-3)-dimensional simplexes. For n=2, the figure is a triangle with one face. For n=3, the figure is a tetrahedron with four triangular faces and four peaks (vertices). For n=4, the figure is a 4-simplex with ten triangular faces and ten peaks (edges). The Schläfli symbol {3,...,3}, of the regular n-dimensional simplex consists of n-1 3's. Two oriented colorings are the same if one is a rotation of the other; chiral pairs are counted as two.
The algorithm used in the Mathematica program below assigns each permutation of the vertices to a cycle-structure partition of n+1. It then determines the number of permutations for each partition and the cycle index for each partition. If the value of m is increased, one can enumerate colorings of higher-dimensional elements beginning with T(m,1).

Examples

			Triangle begins with T(2,1):
  1
  1  3    3     2
  1 38 1080 14040 85500 274104 493920 504000 272160 60480
  ...
For T(3,2)=3, the tetrahedron has one, two, or three faces (vertices) of one color.
		

Crossrefs

Cf. A338114 (unoriented), A338115 (chiral), A338116 (achiral), A337883 (k or fewer colors), A325002 (vertices and facets), A327087 (edges and ridges).

Programs

  • Mathematica
    m=2; (* dimension of color element, here a triangular face *)
    lw[n_, k_]:=lw[n, k]=DivisorSum[GCD[n, k], MoebiusMu[#]Binomial[n/#, k/#]&]/n (*A051168*)
    cxx[{a_, b_}, {c_, d_}]:={LCM[a, c], GCD[a, c] b d}
    compress[x:{{, } ...}] := (s=Sort[x]; For[i=Length[s], i>1, i-=1, If[s[[i, 1]]==s[[i-1, 1]], s[[i-1, 2]]+=s[[i, 2]]; s=Delete[s, i], Null]]; s)
    combine[a : {{, } ...}, b : {{, } ...}] := Outer[cxx, a, b, 1]
    CX[p_List, 0] := {{1, 1}} (* cycle index for partition p, m vertices *)
    CX[{n_Integer}, m_] := If[2m>n, CX[{n}, n-m], CX[{n}, m] = Table[{n/k, lw[n/k, m/k]}, {k, Reverse[Divisors[GCD[n, m]]]}]]
    CX[p_List, m_Integer] := CX[p, m] = Module[{v = Total[p], q, r}, If[2 m > v, CX[p, v - m], q = Drop[p, -1]; r = Last[p]; compress[Flatten[Join[{{CX[q, m]}}, Table[combine[CX[q, m - j], CX[{r}, j]], {j, Min[m, r]}]], 2]]]]
    pc[p_] := Module[{ci, mb}, mb = DeleteDuplicates[p]; ci = Count[p, #] &/@ mb; Total[p]!/(Times @@ (ci!) Times @@ (mb^ci))] (* partition count *)
    row[n_Integer] := row[n] = Factor[Total[If[EvenQ[Total[1-Mod[#, 2]]], pc[#] j^Total[CX[#, m+1]][[2]], 0] & /@ IntegerPartitions[n+1]]/((n+1)!/2)]
    array[n_, k_] := row[n] /. j -> k
    Table[LinearSolve[Table[Binomial[i,j],{i,Binomial[n+1,m+1]},{j,Binomial[n+1,m+1]}], Table[array[n,k],{k,Binomial[n+1,m+1]}]], {n,m,m+4}] // Flatten

Formula

A337883(n,k) = Sum_{j=1..C(n+1,3)} T(n,j) * binomial(k,j).
T(n,k) = A338114(n,k) + A338115(n,k) = 2*A338114(n,k) - A338116(n,k) = 2*A338115(n,k) + A338116(n,k).
T(3,k) = A325002(3,k); T(4,k) = A327087(4,k).

A371992 Number of different closest packings of equal spheres for rhombohedral crystals having repeat period n.

Original entry on oeis.org

0, 0, 1, 1, 2, 3, 5, 8, 15, 23, 41, 70, 126, 223, 406, 740, 1370, 2545, 4769, 8977, 16985, 32261, 61469, 117488, 225060, 432159, 831235, 1601796, 3090926, 5973198, 11556533, 22385600, 43405353, 84247085, 163661488, 318209920, 619181766, 1205733457, 2349558582, 4581555964, 8939468450, 17453081143, 34094082857
Offset: 1

Views

Author

R. J. Mathar, Apr 15 2024

Keywords

Crossrefs

Programs

  • Mathematica
    fa[p_,q_] := fa[p,q] = (p+q-1)!/(p!q!) - Sum[fa[p/d,q/d]/d, {d, Rest[Intersection@@(Divisors/@{p,q})]}]; (*A051168(p+q,p); Iglesias Eq. (1)*)
    fb[p_,q_] := fb[p,q] = (Quotient[p,2]+Quotient[q,2])!/(Quotient[p,2]!Quotient[q,2]!) - Sum[fb[p/d,q/d], {d, Rest[Intersection@@(Divisors/@{p,q})]}]; (*A180424(p+q,p); Eq. (2)*)
    am[p_] := am[p] = 2^(p-1) - Sum[am[p/d], {d, Rest@Divisors@p}]; (*A000740; Eq. (6)*)
    atf[p_] := atf[p] = 2^(p-1)/p - Sum[atf[p/d]/d, {d, Select[Rest@Divisors@p, OddQ]}];(*A000048; Eq. (9)*)
    a[n_] := Sum[With[{p=n-q}, fa[p,q]+fb[p,q] + If[p==q, am[p]+atf[p]-fa[p,q]-fb[p,q], 0] / 2], {q, Select[Range[n/2], !Divisible[n-2#,3]& (*the opposite condition would give A371991*)]}] / 2; (* Eq. (5) *)
    Table[a[n], {n, 2, 40}] (* Andrei Zabolotskii, May 30 2025 *)
  • PARI
    apply( {A371992(n)=sum(q=1, n\2, if((n-2*q)%3, A051168(n,q)+A180424(n,q)))/2}, [1..40]) \\ M. F. Hasler, Jun 05 2025

Formula

a(n) + A371991(n) = A000046(n).
a(n+1)/a(n) = 2 - 2/n + o(1/n). - M. F. Hasler, Jun 09 2025

Extensions

Offset changed to 1 and a(1) = 0 prefixed by M. F. Hasler, Jun 05 2025

A123223 Triangle read by rows: T(n,k) = number of ternary Lyndon words of length n with exactly k 1's.

Original entry on oeis.org

1, 2, 1, 1, 2, 0, 2, 4, 2, 0, 3, 8, 5, 2, 0, 6, 16, 16, 8, 2, 0, 9, 32, 38, 26, 9, 2, 0, 18, 64, 96, 80, 40, 12, 2, 0, 30, 128, 220, 224, 137, 56, 13, 2, 0, 56, 256, 512, 596, 448, 224, 74, 16, 2, 0, 99, 512, 1144, 1536, 1336, 806, 332, 96, 17, 2, 0, 186, 1024, 2560, 3840, 3840
Offset: 0

Views

Author

Mike Zabrocki, Nov 05 2006

Keywords

Comments

Sum of rows equal to number of ternary Lyndon words A027376 first column (k=0) is equal to the number of binary Lyndon words A001037 third through sixth column (k=2,3,4,5) equal to A124720, A124721, A124722, A124723 T(n+1,n-1) entry equal to A042948.

Examples

			Triangle begins:
   1;
   2,  1;
   1,  2,  0;
   2,  4,  2,  0;
   3,  8,  5,  2,  0;
   6, 16, 16,  8,  2,  0;
   9, 32, 38, 26,  9,  2, 0;
  18, 64, 96, 80, 40, 12, 2, 0;
T(n,1) = 2^(n-1) because all words beginning with a 1 and consisting of the rest 2's or 3's are ternary Lyndon words with exactly one 1.
		

Crossrefs

Formula

G.f. for columns (except for k=0) given by 1/k*Sum_{d|k} mu(d) x^k/(1-2*x^d)^(k/d) T(0,0) = 1 and T(n,0) = 1/n*Sum_{d|n} mu(d)*2^(n/d) T(n,n) = 0 if n>1, T(n,n-1) = 2.

A289386 Number of rounds of 'deal one, skip one' shuffling required to return a deck of n cards to its original order.

Original entry on oeis.org

1, 2, 3, 2, 5, 6, 5, 4, 6, 6, 15, 12, 12, 30, 15, 4, 17, 18, 10, 20, 21, 14, 24, 90, 63, 26, 27, 18, 66, 12, 210, 12, 33, 90, 35, 30, 110, 120, 120, 26, 41, 42, 105, 30, 45, 30, 60, 48, 120, 50, 42, 510, 53, 1680, 120, 1584, 57, 336, 276, 60, 2665, 720, 8415
Offset: 1

Views

Author

Andrew Warren, Jul 04 2017

Keywords

Comments

Origin unknown. First encountered by this author as part of an employment-interview question at Apple Inc, in early 2016.
While holding a deck of n cards:
1. Deal the top card from the deck onto the table ('deal one').
2. Move the next card from the top of the deck to the bottom of the deck ('skip one').
3. Repeat steps 1 and 2 until all cards are on the table. This is a round.
4. Pick up the deck from the table and repeat steps 1 through 3 until the deck is in its original order.
From Robert Israel, Jul 06 2017: (Start)
a(n) <= A000793(n).
a(n) divides n!.
Conjecture: a(n) < n for infinitely many n.
Conjecture: the set of n for which the permutation is a single n-cycle, and thus a(n) = n, has nonzero density. (End)
It appears that for n = 2^k and all m > n, a(n) <= a(m). - Andrew Warren, Jul 15 2017
a(2^(k+1)) / a(2^k) = A020513(k+2) at least for 1 <= k <= 30, according to the values computed by Andrew Warren. - Andrey Zabolotskiy, Apr 02 2018

Examples

			Cards are labeled 'A', 'B', 'C', etc. 'ABCD' is a deck with 'A' on top, 'D' on the bottom.
For n = 4:
Round 1:
Hand: ABCD    Table: [empty] - initial state of Round 1
Hand: BCD     Table: A       - Deal one
Hand: CDB     Table: A       - Skip one
Hand: DB      Table: CA      - Deal one
Hand: BD      Table: CA      - Skip one
Hand: D       Table: BCA     - Deal one
Hand: D       Table: BCA     - Skip one
Hand: [empty] Table: DBCA    - Deal one, end of Round 1
Round 2:
Hand: DBCA    Table: [empty] - Initial state of Round 2
Hand: BCA     Table: D       - Deal one
Hand: CAB     Table: D       - Skip one
Hand: AB      Table: CD      - Deal one
Hand: BA      Table: CD      - Skip one
Hand: A       Table: BCD     - Deal one
Hand: A       Table: BCD     - Skip one
Hand [empty]  Table: ABCD    - Deal one, end of Round 2
The deck of 4 cards is in its original order ('ABCD') after 2 rounds, so a(4) = 2.
		

Crossrefs

Cf. A000793, A051732 (variation with cards dealt face up), A020513, A051168.

Programs

  • C
    // see link
    
  • Maple
    F:= proc(n)
    local deck, table, i;
    deck:= [$1..n];
    table:= NULL;
    for i from 1 to n-1 do
      table:= deck[1],table;
      deck:= deck[[$3..nops(deck),2]];
    od:
    ilcm(op(map(nops,convert([deck[1],table],'disjcyc'))));
    end proc:
    map(F, [$1..100]); # Robert Israel, Jul 06 2017
  • Mathematica
    P[n_, i_] := Module[{d = 2i - 1}, While[d < n, d *= 2]; 2n - d];
    Follow[s_, f_] := Module[{t = f[s], k = 1}, While[t > s, k++; t = f[t]]; If[s == t, k, 0]];
    CyclePoly[n_, x_] := Module[{q = 0}, For[i = 1, i <= n, i++, l = Follow[i, P[n, #]&]; If[l != 0, q += x^l]]; q];
    a[n_] := Module[{q = CyclePoly[n, x], m = 1}, For[i = 1, i <= Exponent[q, x], i++, If[Coefficient[q, x, i] != 0, m = LCM[m, i]]]; m];
    Array[a, 60] (* Jean-François Alcover, Apr 09 2020, after Andrew Howroyd *)
  • PARI
    deal(v)=my(deck=List(v),new=List(),cutoff=4000+#v,i=1); while(#deck>=i, listput(new,deck[i]); if(i++>#deck, break); listput(deck, deck[i]); if(#deck>cutoff, deck=List(deck[i+1..#deck]); i=0); i++); Vecrev(new)
    ordered(v)=for(i=1,#v, if(v[i]!=i, return(0))); 1
    a(n)=my(v=[1..n],t=1); while(!ordered(v=deal(v)), t++); t \\ Charles R Greathouse IV, Jul 06 2017
    
  • PARI
    \\ alternative for larger n such as 2^n.
    P(n,i)=my(d=2*i-1); while(ds, k++; t=f(t)); if(s==t, k, 0)}
    CyclePoly(n, x)={my(q=0); for(i=1, n, my(l=Follow(i, j->P(n, j))); if(l, q+=x^l)); q}
    a(n)={my(q=CyclePoly(n, x), m=1); for(i=1, poldegree(q), if(polcoeff(q, i), m=lcm(m, i))); m} \\ Andrew Howroyd, Nov 11 2017

A338114 Triangle read by rows: T(n,k) is the number of unoriented colorings of the faces (and peaks) of a regular n-dimensional simplex using exactly k colors. Row n has C(n+1,3) columns.

Original entry on oeis.org

1, 1, 3, 3, 1, 1, 32, 693, 7720, 44150, 138312, 247380, 252000, 136080, 30240, 1, 2134, 4971504, 1513872568, 124978335900, 4307090369304, 78010256156784, 849590196841344, 6053725780061400, 29824685516682000, 105382759395846240, 273441179492268480
Offset: 2

Views

Author

Robert A. Russell, Oct 10 2020

Keywords

Comments

An n-dimensional simplex has n+1 vertices, C(n+1,3) faces, and C(n+1,3) peaks, which are (n-3)-dimensional simplexes. For n=2, the figure is a triangle with one face. For n=3, the figure is a tetrahedron with four triangular faces and four peaks (vertices). For n=4, the figure is a 4-simplex with ten triangular faces and ten peaks (edges). The Schläfli symbol {3,...,3}, of the regular n-dimensional simplex consists of n-1 3's. Two unoriented colorings are the same if they are congruent; chiral pairs are counted as one.
The algorithm used in the Mathematica program below assigns each permutation of the vertices to a cycle-structure partition of n+1. It then determines the number of permutations for each partition and the cycle index for each partition. If the value of m is increased, one can enumerate colorings of higher-dimensional elements beginning with T(m,1).

Examples

			Triangle begins with T(2,1):
  1
  1  3   3    1
  1 32 693 7720 44150 138312 247380 252000 136080 30240
  ...
For T(3,2)=3, the tetrahedron has one, two, or three faces (vertices) of one color. For T(3,4)=1, each of the four tetrahedron faces (vertices) is a different color.
		

Crossrefs

Cf. A338113 (oriented), A338115 (chiral), A338116 (achiral), A337884 (k or fewer colors), A007318(n,k-1) (vertices and facets), A327088 (edges and ridges).

Programs

  • Mathematica
    m=2; (* dimension of color element, here a triangular face *)
    lw[n_, k_]:=lw[n, k]=DivisorSum[GCD[n, k], MoebiusMu[#]Binomial[n/#, k/#]&]/n (*A051168*)
    cxx[{a_, b_}, {c_, d_}]:={LCM[a, c], GCD[a, c] b d}
    compress[x:{{, } ...}] := (s=Sort[x]; For[i=Length[s], i>1, i-=1, If[s[[i, 1]]==s[[i-1, 1]], s[[i-1, 2]]+=s[[i, 2]]; s=Delete[s, i], Null]]; s)
    combine[a : {{, } ...}, b : {{, } ...}] := Outer[cxx, a, b, 1]
    CX[p_List, 0] := {{1, 1}} (* cycle index for partition p, m vertices *)
    CX[{n_Integer}, m_] := If[2m>n, CX[{n}, n-m], CX[{n}, m] = Table[{n/k, lw[n/k, m/k]}, {k, Reverse[Divisors[GCD[n, m]]]}]]
    CX[p_List, m_Integer] := CX[p, m] = Module[{v = Total[p], q, r}, If[2 m > v, CX[p, v - m], q = Drop[p, -1]; r = Last[p]; compress[Flatten[Join[{{CX[q, m]}}, Table[combine[CX[q, m - j], CX[{r}, j]], {j, Min[m, r]}]], 2]]]]
    pc[p_] := Module[{ci, mb}, mb = DeleteDuplicates[p]; ci = Count[p, #] &/@ mb; Total[p]!/(Times @@ (ci!) Times @@ (mb^ci))] (* partition count *)
    row[n_Integer] := row[n] = Factor[Total[pc[#] j^Total[CX[#, m+1]][[2]] & /@ IntegerPartitions[n+1]]/(n+1)!]
    array[n_, k_] := row[n] /. j -> k
    Table[LinearSolve[Table[Binomial[i,j],{i,Binomial[n+1,m+1]},{j,Binomial[n+1,m+1]}], Table[array[n,k],{k,Binomial[n+1,m+1]}]], {n,m,m+4}] // Flatten

Formula

A337884(n,k) = Sum_{j=1..C(n+1,3)} T(n,j) * binomial(k,j).
T(n,k) = A338113(n,k) - A338115(n,k) = (A338113(n,k) + A338116(n,k)) / 2 = A338115(n,k) + A338116(n,k).
T(3,k) = A007318(3,k-1); T(4,k) = A327088(4,k).

A338115 Triangle read by rows: T(n,k) is the number of chiral pairs of colorings of the faces (and peaks) of a regular n-dimensional simplex using exactly k colors. Row n has C(n+1,3) columns.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 6, 387, 6320, 41350, 135792, 246540, 252000, 136080, 30240, 0, 1368, 4771602, 1503445800, 124777747050, 4305186592884, 77999895773184, 849555062883744, 6053648136215400, 29824571700428400
Offset: 2

Views

Author

Robert A. Russell, Oct 10 2020

Keywords

Comments

An n-dimensional simplex has n+1 vertices, C(n+1,3) faces, and C(n+1,3) peaks, which are (n-3)-dimensional simplexes. For n=2, the figure is a triangle with one face. For n=3, the figure is a tetrahedron with four triangular faces and four peaks (vertices). For n=4, the figure is a 4-simplex with ten triangular faces and ten peaks (edges). The Schläfli symbol {3,...,3}, of the regular n-dimensional simplex consists of n-1 3's. Each member of a chiral pair is a reflection, but not a rotation, of the other.
The algorithm used in the Mathematica program below assigns each permutation of the vertices to a cycle-structure partition of n+1. It then determines the number of permutations for each partition and the cycle index for each partition. If the value of m is increased, one can enumerate colorings of higher-dimensional elements beginning with T(m,1).

Examples

			Triangle begins with T(2,1):
  0
  0 0   0    1
  0 6 387 6320 41350 135792 246540 252000 136080 30240
  ...
For T(4,4)=1, each of the four tetrahedron faces (vertices) is a different color.
		

Crossrefs

Cf. A338113 (oriented), A338114 (unoriented), A338116 (achiral), A337885 (k or fewer colors), [k==n+1] (vertices and facets), A327089 (edges and ridges).

Programs

  • Mathematica
    m=2; (* dimension of color element, here a triangular face *)
    lw[n_, k_]:=lw[n, k]=DivisorSum[GCD[n, k], MoebiusMu[#]Binomial[n/#, k/#]&]/n (*A051168*)
    cxx[{a_, b_}, {c_, d_}]:={LCM[a, c], GCD[a, c] b d}
    compress[x:{{, } ...}] := (s=Sort[x]; For[i=Length[s], i>1, i-=1, If[s[[i, 1]]==s[[i-1, 1]], s[[i-1, 2]]+=s[[i, 2]]; s=Delete[s, i], Null]]; s)
    combine[a : {{, } ...}, b : {{, } ...}] := Outer[cxx, a, b, 1]
    CX[p_List, 0] := {{1, 1}} (* cycle index for partition p, m vertices *)
    CX[{n_Integer}, m_] := If[2m>n, CX[{n}, n-m], CX[{n}, m] = Table[{n/k, lw[n/k, m/k]}, {k, Reverse[Divisors[GCD[n, m]]]}]]
    CX[p_List, m_Integer] := CX[p, m] = Module[{v = Total[p], q, r}, If[2 m > v, CX[p, v - m], q = Drop[p, -1]; r = Last[p]; compress[Flatten[Join[{{CX[q, m]}}, Table[combine[CX[q, m - j], CX[{r}, j]], {j, Min[m, r]}]], 2]]]]
    pc[p_] := Module[{ci, mb}, mb = DeleteDuplicates[p]; ci = Count[p, #] &/@ mb; Total[p]!/(Times @@ (ci!) Times @@ (mb^ci))] (* partition count *)
    row[n_Integer] := row[n] = Factor[Total[If[EvenQ[Total[1-Mod[#, 2]]], 1, -1] pc[#] j^Total[CX[#, m+1]][[2]] & /@ IntegerPartitions[n+1]]/(n+1)!]
    array[n_, k_] := row[n] /. j -> k
    Table[LinearSolve[Table[Binomial[i,j],{i,Binomial[n+1,m+1]},{j,Binomial[n+1,m+1]}], Table[array[n,k],{k,Binomial[n+1,m+1]}]], {n,m,m+4}] // Flatten

Formula

A337885(n,k) = Sum_{j=1..C(n+1,3)} T(n,j) * binomial(k,j).
T(n,k) = A338113(n,k) - A338114(n,k) = (A338113(n,k) - A338116(n,k)) / 2 = A338114(n,k) - A338116(n,k).
T(3,k) = [k==4]; T(4,k) = A327089(4,k).

A338116 Triangle read by rows: T(n,k) is the number of achiral colorings of the faces (and peaks) of a regular n-dimensional simplex using exactly k colors. Row n has C(n+1,3) columns.

Original entry on oeis.org

1, 1, 3, 3, 0, 1, 26, 306, 1400, 2800, 2520, 840, 0, 0, 0, 1, 766, 199902, 10426768, 200588850, 1903776420, 10360383600, 35133957600, 77643846000, 113816253600, 109880971200, 67199932800, 23610787200, 3632428800, 0, 0, 0, 0, 0, 0
Offset: 2

Views

Author

Robert A. Russell, Oct 10 2020

Keywords

Comments

An n-dimensional simplex has n+1 vertices, C(n+1,3) faces, and C(n+1,3) peaks, which are (n-3)-dimensional simplexes. For n=2, the figure is a triangle with one face. For n=3, the figure is a tetrahedron with four triangular faces and four peaks (vertices). For n=4, the figure is a 4-simplex with ten triangular faces and ten peaks (edges). The Schläfli symbol {3,...,3}, of the regular n-dimensional simplex consists of n-1 3's. An achiral coloring is identical to its reflection.
The algorithm used in the Mathematica program below assigns each permutation of the vertices to a cycle-structure partition of n+1. It then determines the number of permutations for each partition and the cycle index for each partition. If the value of m is increased, one can enumerate colorings of higher-dimensional elements beginning with T(m,1).

Examples

			Triangle begins with T(2,1):
  1
  1   3      3        0
  1  26    306     1400      2800       2520         840           0   0   0
  1 766 199902 10426768 200588850 1903776420 10360383600 35133957600 ...
  ...
For T(3,3)=3, one of the three colors appears on two faces (vertices) of the tetrahedron.
		

Crossrefs

Cf. A338113 (oriented), A338114 (unoriented), A338115 (chiral), A337886 (k or fewer colors), A325003 (vertices and facets), A327090 (edges and ridges).

Programs

  • Mathematica
    m=2; (* dimension of color element, here a triangular face *)
    lw[n_, k_]:=lw[n, k]=DivisorSum[GCD[n, k], MoebiusMu[#]Binomial[n/#, k/#]&]/n (*A051168*)
    cxx[{a_, b_}, {c_, d_}]:={LCM[a, c], GCD[a, c] b d}
    compress[x:{{, } ...}] := (s=Sort[x]; For[i=Length[s], i>1, i-=1, If[s[[i, 1]]==s[[i-1, 1]], s[[i-1, 2]]+=s[[i, 2]]; s=Delete[s, i], Null]]; s)
    combine[a : {{, } ...}, b : {{, } ...}] := Outer[cxx, a, b, 1]
    CX[p_List, 0] := {{1, 1}} (* cycle index for partition p, m vertices *)
    CX[{n_Integer}, m_] := If[2m>n, CX[{n}, n-m], CX[{n}, m] = Table[{n/k, lw[n/k, m/k]}, {k, Reverse[Divisors[GCD[n, m]]]}]]
    CX[p_List, m_Integer] := CX[p, m] = Module[{v = Total[p], q, r}, If[2 m > v, CX[p, v - m], q = Drop[p, -1]; r = Last[p]; compress[Flatten[Join[{{CX[q, m]}}, Table[combine[CX[q, m - j], CX[{r}, j]], {j, Min[m, r]}]], 2]]]]
    pc[p_] := Module[{ci, mb}, mb = DeleteDuplicates[p]; ci = Count[p, #] &/@ mb; Total[p]!/(Times @@ (ci!) Times @@ (mb^ci))] (* partition count *)
    row[n_Integer] := row[n] = Factor[Total[If[OddQ[Total[1-Mod[#, 2]]], pc[#] j^Total[CX[#, m+1]][[2]], 0] & /@ IntegerPartitions[n+1]]/((n+1)!/2)]
    array[n_, k_] := row[n] /. j -> k
    Table[LinearSolve[Table[Binomial[i,j],{i,Binomial[n+1,m+1]},{j,Binomial[n+1,m+1]}], Table[array[n,k],{k,Binomial[n+1,m+1]}]], {n,m,m+4}] // Flatten

Formula

A337886(n,k) = Sum_{j=1..C(n+1,3)} T(n,j) * binomial(k,j).
T(n,k) = 2*A338114(n,k) - A338113(n,k) = A338113(n,k) - 2*A338115(n,k) = A338114(n,k) - A338115(n,k).
T(3,k) = A325003(3,k); T(4,k) = A327090(4,k).

A011845 a(n) = floor( binomial(n,8)/9).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 18, 55, 143, 333, 715, 1430, 2701, 4862, 8398, 13996, 22610, 35530, 54479, 81719, 120175, 173586, 246675, 345345, 476905, 650325, 876525, 1168700, 1542684, 2017356, 2615091, 3362260, 4289780, 5433721, 6835972, 8544965, 10616471
Offset: 0

Views

Author

Keywords

Crossrefs

A column of triangle A011847.

Programs

Formula

a(n) = floor(binomial(n+1,9)/(n+1)). [Gary Detlefs, Nov 23 2011]

Extensions

Definition corrected by Pedro Antonio, Oct 14 2015
More terms from Vincenzo Librandi, Oct 15 2015

A303979 Triangle read by rows: T(n,k) is the number of cyclic unimodal permutations of length n with a peak at position k.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 2, 1, 0, 0, 1, 2, 3, 2, 1, 0, 0, 1, 3, 4, 4, 3, 1, 0, 0, 1, 3, 6, 8, 6, 3, 1, 0, 0, 1, 3, 9, 13, 12, 8, 4, 1, 0, 0, 1, 4, 11, 19, 23, 19, 11, 4, 1, 0, 0, 1, 5, 13, 27, 39, 39, 27, 13, 5, 1, 0
Offset: 1

Views

Author

Kassie Archer, May 03 2018

Keywords

Examples

			For n = 5, there are 6 unimodal cyclic permutations: 234561, 235641, 246531, 345621, 465321. There are T(6,1) = 0 with peak at position 1, T(6,2) = 1 with peak at position 2, T(6,3) = 1 with peak at position 3, T(6,4) = 2 with peak at position 4, T(6,5) = 1 with peak at position 5, and T(6,6) = 0 with peak at position 6.
Starting at n=1 with 1 <= k <= n, the triangle begins:
  0,
  0, 0,
  0, 1, 0,
  0, 1, 1, 0,
  0, 1, 1, 1, 0,
  0, 1, 1, 2, 1, 0,
  0, 1, 2, 3, 2, 1, 0,
		

Crossrefs

Cf. A051168.

Programs

  • PARI
    t051168(n,k) = if (n==0, 1, (1/n) * sumdiv(gcd(n,k), d, moebius(d) * binomial(n/d,k/d)));
    T(n, k) = my(t=sum(j=1, k-1, (-1)^(k+j+1)*t051168(n,j))); if (!(n % 2), t += (-1)^(k+1)*sum(j=1, k-1, if (((n-j) % 4) == 2, t051168(n/2, j/2)))); t;
    tabl(nn) = for (n=1, nn, for (k=1, n, print1(T(n, k), ", ")); print); \\ Michel Marcus, May 16 2018

Formula

T(n,k) = Sum_{j=1..k-1} (-1)^(k+j+1)*A051168(n,j), when n is odd and n>2;
T(n,k) = Sum_{j=1..k-1} (-1)^(k+j+1)*A051168(n,j)+(-1)^(k+1)*Sum_{jA051168(n/2, j/2), when n is even and n>2.
Previous Showing 41-50 of 54 results. Next