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 12 results. Next

A006527 a(n) = (n^3 + 2*n)/3.

Original entry on oeis.org

0, 1, 4, 11, 24, 45, 76, 119, 176, 249, 340, 451, 584, 741, 924, 1135, 1376, 1649, 1956, 2299, 2680, 3101, 3564, 4071, 4624, 5225, 5876, 6579, 7336, 8149, 9020, 9951, 10944, 12001, 13124, 14315, 15576, 16909, 18316, 19799, 21360, 23001, 24724, 26531, 28424, 30405
Offset: 0

Views

Author

Keywords

Comments

Number of ways to color vertices (or edges) of a triangle using <= n colors, allowing only rotations.
Also: dot_product (1,2,...,n)*(2,3,...,n,1), n >= 0. - Clark Kimberling
Start from triacid and attach amino acids according to the reaction scheme that describes the reaction between the active sites. See the hyperlink below on chemistry. - Robert G. Wilson v, Aug 02 2002
Starting with offset 1 = row sums of triangle A158822 and binomial transform of (1, 3, 4, 2, 0, 0, 0, ...). - Gary W. Adamson, Mar 28 2009
One-ninth of sum of three consecutive cubes: a(n) = ((n-1)^3 + n^3 + (n+1)^3)/9. - Zak Seidov, Jul 22 2013
For n > 2, number of different cubes, formed after splitting a cube in color C_1, by parallel planes in the colors C_2, C_3, ..., C_n in three spatial dimensions (in the order of the colors from a fixed vertex). Generally, in a large hypercube n^d is f(n,d) = C(n+d-1, d) + C(n, d) different small hypercubes. See below for my formula a(n) = f(n,3). - Thomas Ordowski, Jun 15 2014
a(n) is a square for n = 1, 2 & 24; and for no other values up to 10^7 (see M. Gardner). - Michel Marcus, Sep 06 2015
Number of unit tetrahedra contained in an n-scale tetrahedron composed of a tetrahedral-octahedral honeycomb. - Jason Pruski, Aug 23 2017

References

  • M. Gardner, New Mathematical Diversions from Scientific American. Simon and Schuster, NY, 1966, p. 246.
  • S. Mukai, An Introduction to Invariants and Moduli, Cambridge, 2003; see p. 483.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

(1/12)*t*(n^3-n)+n for t = 2, 4, 6, ... gives A004006, A006527, A006003, A005900, A004068, A000578, A004126, A000447, A004188, A004466, A004467, A007588, A062025, A063521, A063522, A063523.
Column 1 of triangle A094414. Row 6 of the array in A107735.
Cf. A000292 (unoriented), A000292(n-2) (chiral), A000290 (achiral) triangle colorings.
Row 2 of A324999 (simplex vertices and facets) and A327083 (simplex edges and ridges).

Programs

  • Haskell
    a006527 n = n * (n ^ 2 + 2) `div` 3  -- Reinhard Zumkeller, Jan 06 2014
  • Magma
    [(n^3 + 2*n)/3: n in [0..50]]; // Vincenzo Librandi, May 15 2011
    
  • Maple
    A006527:=z*(1+z**2)/(z-1)**4; # conjectured by Simon Plouffe in his 1992 dissertation
    with(combinat):seq(lcm(fibonacci(4,n),fibonacci(2,n))/3,n=0..42); # Zerinvary Lajos, Apr 20 2008
  • Mathematica
    Table[ (n^3 + 2*n)/3, {n, 0, 45} ]
    LinearRecurrence[{4,-6,4,-1},{0,1,4,11},46] (* or *) CoefficientList[ Series[(x+x^3)/(x-1)^4,{x,0,49}],x] (* Harvey P. Dale, Jun 13 2011 *)
  • PARI
    a(n)=n*(n^2+2)/3 \\ Charles R Greathouse IV, Jul 25 2011
    

Formula

a(0)=0, a(1)=1, a(2)=4, a(3)=11; for n > 3, a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Harvey P. Dale, Jun 13 2011
From Paul Barry, Mar 13 2003: (Start)
a(n) = 2*binomial(n+1, 3) + binomial(n, 1).
G.f.: x*(1+x^2)/(1-x)^4. (End)
a(n) = A000292(n) + A000292(n-2). - Alexander Adamchuk, May 20 2006
a(n) = n*A059100(n)/3. - Lekraj Beedassy, Feb 06 2007
a(n) = A054602(n)/3. - Zerinvary Lajos, Apr 20 2008
a(n) = ( n + Sum_{i=1..n} A177342(i) )/(n+1), with n > 0. - Bruno Berselli, May 19 2010
a(n) = A002264(A000578(n) + A005843(n)). - Reinhard Zumkeller, Jun 16 2011
a(n) = binomial(n+2, 3) + binomial(n, 3). - Thomas Ordowski, Jun 15 2014
a(n) = A000292(n) - A000292(-n). - Bruno Berselli, Sep 22 2016
E.g.f.: (x/3)*(3 + 3*x + x^2)*exp(x). - G. C. Greubel, Sep 01 2017
From Robert A. Russell, Oct 20 2020: (Start)
a(n) = 1*C(n,1) + 2*C(n,2) + 2*C(n,3), where the coefficient of C(n,k) is the number of oriented triangle colorings using exactly k colors.
a(n) = 2*A000292(n) - A000290(n) = 2*A000292(n-2) + A000290(n). (End)
Sum_{n>0} 1/a(n) = 3*(2*gamma + polygamma(0, 1-i*sqrt(2)) + polygamma(0, 1+i*sqrt(2)))/4 = 1.45245201414472469745354677573358867... where i denotes the imaginary unit. - Stefano Spezia, Aug 31 2023

Extensions

More terms from Alexander Adamchuk, May 20 2006
Corrected and replaced 5th formula from Harvey P. Dale, Jun 13 2011
Deleted an erroneous comment. - N. J. A. Sloane, Dec 10 2018

A327084 Array read by descending antidiagonals: A(n,k) is the number of unoriented colorings of the edges of a regular n-dimensional simplex using up to k colors.

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 4, 10, 11, 1, 5, 20, 66, 34, 1, 6, 35, 276, 792, 156, 1, 7, 56, 900, 10688, 25506, 1044, 1, 8, 84, 2451, 90005, 1601952, 2302938, 12346, 1, 9, 120, 5831, 533358, 43571400, 892341888, 591901884, 274668
Offset: 1

Views

Author

Robert A. Russell, Aug 19 2019

Keywords

Comments

An n-dimensional simplex has n+1 vertices and (n+1)*n/2 edges. For n=1, the figure is a line segment with one edge. For n=2, the figure is a triangle with three edges. For n=3, the figure is a tetrahedron with six edges. The Schläfli symbol, {3,...,3}, of the regular n-dimensional simplex consists of n-1 threes. Two unoriented colorings are the same if congruent; chiral pairs are counted as one.
A(n,k) is also the number of unoriented colorings of (n-2)-dimensional regular simplices in an n-dimensional simplex using up to k colors. Thus, A(2,k) is also the number of unoriented colorings of the vertices (0-dimensional simplices) of an equilateral triangle.

Examples

			Array begins with A(1,1):
  1  2   3     4     5      6       7       8        9       10 ...
  1  4  10    20    35     56      84     120      165      220 ...
  1 11  66   276   900   2451    5831   12496    24651    45475 ...
  1 34 792 10688 90005 533358 2437848 9156288 29522961 84293770 ...
  ...
For A(2,3) = 10, the nine achiral colorings are AAA, AAB, AAC, ABB, ACC, BBB, BBC, BCC, and CCC. The chiral pair is ABC-ACB.
		

Crossrefs

Cf. A327083 (oriented), A327085 (chiral), A327086 (achiral), A327088 (exactly k colors), A325000 (vertices, facets), A337884 (faces, peaks), A337408 (orthotope edges, orthoplex ridges), A337412 (orthoplex edges, orthotope ridges).
Rows 1-4 are A000027, A000292, A063842(n-1), A063843.
Cf. A063841 (k-multigraphs on n nodes).

Programs

  • Mathematica
    CycleX[{2}] = {{1,1}}; (* cycle index for permutation with given cycle structure *)
    CycleX[{n_Integer}] := CycleX[n] = If[EvenQ[n], {{n/2,1}, {n,(n-2)/2}}, {{n,(n-1)/2}}]
    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)
    CycleX[p_List] := CycleX[p] = compress[Join[CycleX[Drop[p, -1]], If[Last[p] > 1, CycleX[{Last[p]}], ## &[]], If[# == Last[p], {#, Last[p]}, {LCM[#, Last[p]], GCD[#, Last[p]]}] & /@ Drop[p, -1]]]
    pc[p_List] := 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[CycleX[#]][[2]] & /@ IntegerPartitions[n+1]]/(n+1)!]
    array[n_, k_] := row[n] /. j -> k
    Table[array[n,d-n+1], {d,1,10}, {n,1,d}] // Flatten
    (* Using Fripertinger's exponent per Andrew Howroyd code in A063841: *)
    pc[p_] := Module[{ci, mb}, mb = DeleteDuplicates[p]; ci = Count[p, #] &/@ mb; Total[p]!/(Times @@ (ci!) Times @@ (mb^ci))]
    ex[v_] := Sum[GCD[v[[i]], v[[j]]], {i,2,Length[v]}, {j,i-1}] + Total[Quotient[v,2]]
    array[n_,k_] := Total[pc[#]k^ex[#] &/@ IntegerPartitions[n+1]]/(n+1)!
    Table[array[n,d-n+1], {d,10}, {n,d}] // Flatten
    (* Another program (translated from Andrew Howroyd's PARI code): *)
    permcount[v_] := Module[{m=1, s=0, k=0, t}, For[i=1, i <= Length[v], i++, t = v[[i]]; k = If[i>1 && t == v[[i-1]], k+1, 1]; m *= t*k; s += t]; s!/m];
    edges[v_] := Sum[GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i-1}] + Total[Quotient[v, 2]];
    T[n_, k_] := Module[{s = 0}, Do[s += permcount[p]*k^edges[p], {p, IntegerPartitions[n+1]}]; s/(n+1)!];
    Table[T[n-k+1, k], {n, 1, 9}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jan 08 2021 *)
  • PARI
    permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
    edges(v) = {sum(i=2, #v, sum(j=1, i-1, gcd(v[i], v[j]))) + sum(i=1, #v, v[i]\2)}
    T(n, k) = {my(s=0); forpart(p=n+1, s+=permcount(p)*k^edges(p)); s/(n+1)!} \\ Andrew Howroyd, Sep 06 2019
    
  • Python
    from itertools import combinations
    from math import prod, gcd, factorial
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A327084_T(n,k): return int(sum(Fraction(k**(sum(p[r]*p[s]*gcd(r,s) for r,s in combinations(p.keys(),2))+sum((q>>1)*r+(q*r*(r-1)>>1) for q, r in p.items())),prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n+1))) # Chai Wah Wu, Jul 09 2024

Formula

The algorithm used in the Mathematica program below assigns each permutation of the vertices to a partition of n+1. It then determines the number of permutations for each partition and the cycle index for each partition.
A(n,k) = Sum_{j=1..(n+1)*n/2} A327088(n,j) * binomial(k,j).
A(n,k) = A327083(n,k) - A327085(n,k) = (A327083(n,k) + A327086(n,k)) / 2 = A327085(n,k) + A327086(n,k).
A(n,k) = A063841(n+1,k-1).

A327085 Array read by descending antidiagonals: A(n,k) is the number of chiral pairs of colorings of the edges of a regular n-dimensional simplex using up to k colors.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 4, 21, 6, 0, 0, 10, 140, 405, 28, 0, 0, 20, 575, 7904, 17154, 252, 0, 0, 35, 1785, 76880, 1415648, 1920375, 4726, 0, 0, 56, 4606, 486522, 41453650, 855834880, 547375212, 150324, 0
Offset: 1

Views

Author

Robert A. Russell, Aug 19 2019

Keywords

Comments

An n-dimensional simplex has n+1 vertices and (n+1)*n/2 edges. For n=1, the figure is a line segment with one edge. For n-2, the figure is a triangle with three edges. For n=3, the figure is a tetrahedron with six edges. The Schläfli symbol, {3,...,3}, of the regular n-dimensional simplex consists of n-1 threes. The chiral colorings of its edges come in pairs, each the reflection of the other.
A(n,k) is also the number of chiral pairs of colorings of (n-2)-dimensional regular simplices in an n-dimensional simplex using up to k colors. Thus, A(2,k) is also the number of chiral pairs of colorings of the vertices (0-dimensional simplices) of an equilateral triangle.

Examples

			Array begins with A(1,1):
  0 0   0    0     0      0       0       0        0        0         0 ...
  0 0   1    4    10     20      35      56       84      120       165 ...
  0 1  21  140   575   1785    4606   10416    21330    40425     71995 ...
  0 6 405 7904 76880 486522 2300305 8806336 28725192 82626270 214744629 ...
  ...
For A(2,3) = 1, the chiral pair is ABC-ACB.
		

Crossrefs

Cf. A327083 (oriented), A327084 (unoriented), A327086 (achiral), A327089 (exactly k colors), A325000(n,k-n) (vertices, facets), A337885 (faces, peaks), A337409 (orthotope edges, orthoplex ridges), A337413 (orthoplex edges, orthotope ridges).
Rows 1-4 are A000004, A000292(n-2), A337899, A331352.

Programs

  • Mathematica
    CycleX[{2}] = {{1,1}}; (* cycle index for permutation with given cycle structure *)
    CycleX[{n_Integer}] := CycleX[n] = If[EvenQ[n], {{n/2,1}, {n,(n-2)/2}}, {{n,(n-1)/2}}]
    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)
    CycleX[p_List] := CycleX[p] = compress[Join[CycleX[Drop[p, -1]], If[Last[p] > 1, CycleX[{Last[p]}], ## &[]], If[# == Last[p], {#, Last[p]}, {LCM[#, Last[p]], GCD[#, Last[p]]}] & /@ Drop[p, -1]]]
    pc[p_List] := 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[CycleX[#]][[2]] & /@ IntegerPartitions[n+1]]/(n+1)!]
    array[n_, k_] := row[n] /. j -> k
    Table[array[n,d-n+1], {d,1,10}, {n,1,d}] // Flatten
    (* Using Fripertinger's exponent per Andrew Howroyd's code in A063841: *)
    pc[p_] := Module[{ci, mb}, mb = DeleteDuplicates[p]; ci = Count[p, #] &/@ mb; Total[p]!/(Times @@ (ci!) Times @@ (mb^ci))]
    ex[v_] := Sum[GCD[v[[i]], v[[j]]], {i,2,Length[v]}, {j,i-1}] + Total[Quotient[v,2]]
    array[n_,k_] := Total[If[EvenQ[Total[1-Mod[#,2]]],1,-1] pc[#]k^ex[#] &/@ IntegerPartitions[n+1]]/(n+1)!
    Table[array[n,d-n+1], {d,10}, {n,d}] // Flatten

Formula

The algorithm used in the Mathematica program below assigns each permutation of the vertices to a partition of n+1. It then determines the number of permutations for each partition and the cycle index for each partition.
A(n,k) = Sum_{j=1..(n+1)*n/2} A327089(n,j) * binomial(k,j).
A(n,k) = A327083(n,k) - A327084(n,k) = (A327083(n,k) - A327086(n,k)) / 2 = A327084(n,k) - A327086(n,k).

A327086 Array read by descending antidiagonals: A(n,k) is the number of achiral colorings of the edges of a regular n-dimensional simplex using up to k colors.

Original entry on oeis.org

1, 2, 1, 3, 4, 1, 4, 9, 10, 1, 5, 16, 45, 28, 1, 6, 25, 136, 387, 128, 1, 7, 36, 325, 2784, 8352, 792, 1, 8, 49, 666, 13125, 186304, 382563, 7620, 1, 9, 64, 1225, 46836, 2117750, 36507008, 44526672, 124344
Offset: 1

Views

Author

Robert A. Russell, Aug 19 2019

Keywords

Comments

An n-dimensional simplex has n+1 vertices and (n+1)*n/2 edges. For n=1, the figure is a line segment with one edge. For n-2, the figure is a triangle with three edges. For n=3, the figure is a tetrahedron with six edges. The Schläfli symbol, {3,...,3}, of the regular n-dimensional simplex consists of n-1 threes. An achiral coloring is identical to its reflection.
A(n,k) is also the number of achiral colorings of (n-2)-dimensional regular simplices in an n-dimensional simplex using up to k colors. Thus, A(2,k) is also the number of achiral colorings of the vertices (0-dimensional simplices) of an equilateral triangle.

Examples

			Array begins with A(1,1):
  1  2   3    4     5     6      7      8      9      10      11      12 ...
  1  4   9   16    25    36     49     64     81     100     121     144 ...
  1 10  45  136   325   666   1225   2080   3321    5050    7381   10440 ...
  1 28 387 2784 13125 46836 137543 349952 797769 1667500 3248971 5973408 ...
  ...
For A(2,3) = 9, the colorings are AAA, AAB, AAC, ABB, ACC, BBB, BBC, BCC, and CCC.
		

Crossrefs

Cf. A327083 (oriented), A327084 (unoriented), A327085 (chiral), A327090 (exactly k colors), A325001 (vertices, facets), A337886 (faces, peaks), A337410 (orthotope edges, orthoplex ridges), A337414 (orthoplex edges, orthotope ridges).
Rows 1-4 are A000027, A000290, A037270, A331353.

Programs

  • Mathematica
    CycleX[{2}] = {{1,1}}; (* cycle index for permutation with given cycle structure *)
    CycleX[{n_Integer}] := CycleX[n] = If[EvenQ[n], {{n/2,1}, {n,(n-2)/2}}, {{n,(n-1)/2}}]
    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)
    CycleX[p_List] := CycleX[p] = compress[Join[CycleX[Drop[p, -1]], If[Last[p] > 1, CycleX[{Last[p]}], ## &[]], If[# == Last[p], {#, Last[p]}, {LCM[#, Last[p]], GCD[#, Last[p]]}] & /@ Drop[p, -1]]]
    pc[p_List] := 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]]], 0, pc[#] j^Total[CycleX[#]][[2]]] & /@ IntegerPartitions[n+1]]/((n+1)!/2)]
    array[n_, k_] := row[n] /. j -> k
    Table[array[n,d-n+1], {d,1,10}, {n,1,d}] // Flatten
    (* Using Fripertinger's exponent per Andrew Howroyd's code in A063841: *)
    pc[p_] := Module[{ci, mb}, mb = DeleteDuplicates[p]; ci = Count[p, #] &/@ mb; Total[p]!/(Times @@ (ci!) Times @@ (mb^ci))]
    ex[v_] := Sum[GCD[v[[i]], v[[j]]], {i,2,Length[v]}, {j,i-1}] + Total[Quotient[v,2]]
    array[n_,k_] := Total[If[OddQ[Total[1-Mod[#,2]]], pc[#]k^ex[#], 0] &/@ IntegerPartitions[n+1]]/((n+1)!/2)
    Table[array[n,d-n+1], {d,10}, {n,d}] // Flatten

Formula

The algorithm used in the Mathematica program below assigns each permutation of the vertices to a partition of n+1. It then determines the number of permutations for each partition and the cycle index for each partition.
A(n,k) = Sum_{j=1..(n+1)*n/2} A327090(n,j) * binomial(k,j).
A(n,k) = 2*A327084(n,k) - A327083(n,k) = A327083(n,k) - 2*A327085(n,k) = A327084(n,k) - A327085(n,k).

A324999 Array read by descending antidiagonals: A(n,k) is the number of oriented colorings of the facets (or vertices) of a regular n-dimensional simplex using up to k colors.

Original entry on oeis.org

1, 4, 1, 9, 4, 1, 16, 11, 5, 1, 25, 24, 15, 6, 1, 36, 45, 36, 21, 7, 1, 49, 76, 75, 56, 28, 8, 1, 64, 119, 141, 127, 84, 36, 9, 1, 81, 176, 245, 258, 210, 120, 45, 10, 1, 100, 249, 400, 483, 463, 330, 165, 55, 11, 1, 121, 340, 621, 848, 931, 792, 495, 220, 66, 12, 1
Offset: 1

Views

Author

Robert A. Russell, Mar 23 2019

Keywords

Comments

For n=1, the figure is a line segment with two vertices. For n=2, the figure is a triangle with three edges. For n=3, the figure is a tetrahedron with four triangular faces. The Schläfli symbol, {3,...,3}, of the regular n-dimensional simplex consists of n-1 threes. Each of its n+1 facets is a regular (n-1)-dimensional simplex. Two oriented colorings are the same if one is a rotation of the other; chiral pairs are counted as two.

Examples

			The array begins with A(1,1):
  1  4  9  16  25   36   49    64    81   100   121    144    169    196 ...
  1  4 11  24  45   76  119   176   249   340   451    584    741    924 ...
  1  5 15  36  75  141  245   400   621   925  1331   1860   2535   3381 ...
  1  6 21  56 127  258  483   848  1413  2254  3465   5160   7475  10570 ...
  1  7 28  84 210  463  931  1744  3087  5215  8470  13300  20280  30135 ...
  1  8 36 120 330  792 1717  3440  6471 11560 19778  32616  52104  80952 ...
  1  9 45 165 495 1287 3003  6436 12879 24355 43923  76077 127257 206493 ...
  1 10 55 220 715 2002 5005 11440 24311 48630 92433 168180 294645 499422 ...
  ...
For A(1,2) = 4, the two achiral colorings use just one of the two colors for both vertices; the chiral pair uses two colors. For A(2,2)=4, the triangle may have 0, 1, 2, or 3 edges of one color.
		

Crossrefs

Cf. A325000 (unoriented), A325000(n,k-n) (chiral), A325001 (achiral), A325002 (exactly k colors), A327083 (edges, ridges), A337883 (faces, peaks), A325004 (orthotope facets, orthoplex vertices), A325012 (orthoplex facets, orthotope vertices).
Rows 1-4 are A000290, A006527, A006008, A337895.

Programs

  • Mathematica
    Table[Binomial[d+1,n+1] + Binomial[d+1-n,n+1], {d,1,15}, {n,1,d}] // Flatten

Formula

A(n,k) = binomial(n+k,n+1) + binomial(k,n+1).
A(n,k) = Sum_{j=1..n+1} A325002(n,j) * binomial(k,j).
A(n,k) = A325000(n,k) + A325000(n,k-n) = 2*A325000(n,k) - A325001(n,k) = 2*A325000(n,k-n) + A325001(n,k).
G.f. for row n: (x + x^(n+1)) / (1-x)^(n+2).
Linear recurrence for row n: A(n,k) = Sum_{j=1..n+2} -binomial(j-n-3,j) * A(n,k-j).
G.f. for column k: (1 - 2*(1-x)^k + (1-x^2)^k) / (x*(1-x)^k) - 2*k.

A331350 Number of oriented colorings of the edges (or triangular faces) of a regular 4-dimensional simplex with n available colors.

Original entry on oeis.org

1, 40, 1197, 18592, 166885, 1019880, 4738153, 17962624, 58248153, 166920040, 432738229, 1032709536, 2298857821, 4822806184, 9613704465, 18329410048, 33605960689, 59516325288, 102196242685, 170682720160, 278019522837
Offset: 1

Views

Author

Robert A. Russell, Jan 14 2020

Keywords

Comments

A 4-dimensional simplex has 5 vertices and 10 edges. Its Schläfli symbol is {3,3,3}. Two oriented colorings are the same if one is a rotation of the other; chiral pairs are counted as two.
There are 60 elements in the rotation group of the 4-dimensional simplex. Each is an even permutation of the vertices and can be associated with a partition of 5 based on the conjugacy group of the permutation. The first formula is obtained by averaging their cycle indices after replacing x_i^j with n^j according to the Pólya enumeration theorem.
Partition Count Even Cycle Indices
5 24 x_5^2
311 20 x_1^1x_3^3
221 15 x_1^2x_2^4
11111 1 x_1^10

Crossrefs

Cf. A063843 (unoriented), A331352 (chiral), A331353 (achiral).
Other polychora: A331358 (8-cell), A331354 (16-cell), A338952 (24-cell), A338964 (120-cell, 600-cell).
Row 4 of A327083 (simplex edges and facets) and A337883 (simplex faces and peaks).

Programs

  • Mathematica
    Table[(24n^2 + 20n^4 + 15n^6 + n^10)/60, {n, 1, 25}]

Formula

a(n) = (24*n^2 + 20*n^4 + 15*n^6 + n^10) / 60.
a(n) = C(n,1) + 38*C(n,2) + 1080*C(n,3) + 14040*C(n,4) + 85500*C(n,5) + 274104*C(n,6) + 493920*C(n,7) + 504000*C(n,8) + 272160*C(n,9) + 60480*C(n,10), where the coefficient of C(n,k) is the number of colorings using exactly k colors.
a(n) = A063843(n) + A331352(n) = 2*A063843(n) - A331353(n) = 2*A331352(n) + A331353(n).

A337411 Array read by descending antidiagonals: T(n,k) is the number of oriented colorings of the edges of a regular n-dimensional orthoplex (cross polytope) using k or fewer colors.

Original entry on oeis.org

1, 2, 1, 3, 6, 1, 4, 24, 218, 1, 5, 70, 2285, 90054, 1, 6, 165, 703760, 1471640157, 573439556, 1, 7, 336, 10194250, 1466049174160, 6332134720430727, 50043770249328, 1, 8, 616, 90775566, 310441584462375, 629648890639384572032, 1839894096099964270283469, 59966884221697869216, 1
Offset: 1

Views

Author

Robert A. Russell, Aug 26 2020

Keywords

Comments

Each chiral pair is counted as two when enumerating oriented arrangements. For n=1, the figure is a line segment with one edge. For n=2, the figure is a square with 4 edges. For n=3, the figure is an octahedron with 12 edges. The number of edges is 2n*(n-1) for n>1.
Also the number of oriented colorings of the regular (n-2)-dimensional orthotopes (hypercubes) in a regular n-dimensional orthotope.

Examples

			Table begins with T(1,1):
1   2     3      4        5        6         7          8           9 ...
1   6    24     70      165      336       616       1044        1665 ...
1 218 22815 703760 10194250 90775566 576941778 2863870080 11769161895 ...
For T(2,2)=6, the arrangements are AAAA, AAAB, AABB, ABAB, ABBB, and BBBB.
		

Crossrefs

Cf. A337412 (unoriented), A337413 (chiral), A337414 (achiral).
Rows 1-4 are A000027, A006528, A060530, A331354.
Cf. A327083 (simplex edges), A337407 (orthotope edges), A325004 (orthoplex vertices).

Programs

  • Mathematica
    m=1; (* dimension of color element, here an edge *)
    Fi1[p1_] := Module[{g, h}, Coefficient[Product[g = GCD[k1, p1]; h = GCD[2 k1, p1]; (1 + 2 x^(k1/g))^(r1[[k1]] g) If[Divisible[k1, h], 1, (1+2x^(2 k1/h))^(r2[[k1]] h/2)], {k1, Flatten[Position[cs, n1_ /; n1 > 0]]}], x, m+1]];
    FiSum[] := (Do[Fi2[k2] = Fi1[k2], {k2, Divisors[per]}];DivisorSum[per, DivisorSum[d1 = #, MoebiusMu[d1/#] Fi2[#] &]/# &]);
    CCPol[r_List] := (r1 = r; r2 = cs - r1; If[EvenQ[Sum[If[EvenQ[j3], r1[[j3]], r2[[j3]]], {j3,n}]], (per = LCM @@ Table[If[cs[[j2]] == r1[[j2]], If[0 == cs[[j2]],1,j2], 2j2], {j2,n}]; Times @@ Binomial[cs, r1] 2^(n-Total[cs]) b^FiSum[]),0]);
    PartPol[p_List] := (cs = Count[p, #]&/@ Range[n]; Total[CCPol[#]&/@ Tuples[Range[0,cs]]]);
    pc[p_List] := Module[{ci, mb}, mb = DeleteDuplicates[p]; ci = Count[p, #]&/@ mb; n!/(Times@@(ci!) Times@@(mb^ci))] (*partition count*)
    row[m]=b;
    row[n_Integer] := row[n] = Factor[(Total[(PartPol[#] pc[#])&/@ IntegerPartitions[n]])/(n! 2^(n-1))]
    array[n_, k_] := row[n] /. b -> k
    Table[array[n,d+m-n], {d,8}, {n,m,d+m-1}] // Flatten

Formula

The algorithm used in the Mathematica program below assigns each permutation of the axes to a partition of n and then considers separate conjugacy classes for axis reversals. It uses the formulas in Balasubramanian's paper. If the value of m is increased, one can enumerate colorings of higher-dimensional elements beginning with T(m,1).
T(n,k) = A337412(n,k) + A337413(n,k) = 2*A337412(n,k) - A337414(n,k) = 2*A337413(n,k) + A337414(n,k).

A337883 Array read by descending antidiagonals: T(n,k) is the number of oriented colorings of the triangular faces of a regular n-dimensional simplex using k or fewer colors.

Original entry on oeis.org

1, 2, 1, 3, 5, 1, 4, 15, 40, 1, 5, 36, 1197, 3504, 1, 6, 75, 18592, 9753615, 13724608, 1, 7, 141, 166885, 3056311808, 19854224207910, 3574466244480, 1, 8, 245, 1019880, 264940140875, 468488921670219776, 25959704193068472575379, 106607224611810055168, 1
Offset: 2

Views

Author

Robert A. Russell, Sep 28 2020

Keywords

Comments

Each chiral pair is counted as two when enumerating oriented arrangements. An n-simplex has n+1 vertices. For n=2, the figure is a triangle with one triangular face. For n=3, the figure is a tetrahedron with 4 triangular faces. For higher n, the number of triangular faces is C(n+1,3).
Also the number of oriented colorings of the peaks of a regular n-dimensional simplex. A peak of an n-simplex is an (n-3)-dimensional simplex.

Examples

			The table begins with T(2,1):
 1    2       3          4            5              6               7 ...
 1    5      15         36           75            141             245 ...
 1   40    1197      18592       166885        1019880         4738153 ...
 1 3504 9753615 3056311808 264940140875 10156268150064 221646915632373 ...
For T(3,4)=36, the 34 achiral arrangements are AAAA, AAAB, AAAC, AAAD, AABB, AABC, AABD, AACC, AACD, AADD, ABBB, ABBC, ABBD, ABCC, ABDD, ACCC, ACCD, ACDD, ADDD, BBBB, BBBC, BBBD, BBCC, BBCD, BBDD, BCCC, BCCD, BCDD, BDDD, CCCC, CCCD, CCDD, CDDD, and DDDD. The chiral pair is ABCD-ABDC.
		

Crossrefs

Cf. A337884 (unoriented), A337885 (chiral), A337886 (achiral), A051168 (binary Lyndon words).
Other elements: A324999 (vertices), A327083 (edges).
Other polytopes: A337887 (orthotope), A337891 (orthoplex).
Rows 2-4 are A000027, A006008, A331350.

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[array[n,d+m-n], {d,8}, {n,m,d+m-1}] // Flatten

Formula

The algorithm used in the Mathematica program below assigns each permutation of the vertices to a partition of n+1. It then determines the number of permutations for each partition and the cycle index for each partition using a formula for binary Lyndon words. If the value of m is increased, one can enumerate colorings of higher-dimensional elements beginning with T(m,1).
T(n,k) = A337884(n,k) + A337885(n,k) = 2*A337884(n,k) - A337886(n,k) = 2*A337885(n,k) + A337886(n,k).

A046023 Number of ways to color edges of a tetrahedron using <= n colors.

Original entry on oeis.org

0, 1, 12, 87, 416, 1475, 4236, 10437, 22912, 45981, 85900, 151371, 254112, 409487, 637196, 962025, 1414656, 2032537, 2860812, 3953311, 5373600, 7196091, 9507212, 12406637, 16008576, 20443125, 25857676, 32418387, 40311712
Offset: 0

Views

Author

N. J. A. Sloane, Apr 11 2001

Keywords

Crossrefs

Cf. A006008.
Row 3 of A327083.

Programs

Formula

a(n) = (n^6+3*n^4+8*n^2)/12.
G.f.: x*(1+x)*(1+4*x+20*x^2+4*x^3+x^4)/(1-x)^7. - Colin Barker, Jan 30 2012
E.g.f.: exp(x)*x*(12 + 60*x + 108*x^2 + 68*x^3 + 15*x^4 + x^5)/12. - Stefano Spezia, Feb 29 2024

A327087 Triangle read by rows: T(n,k) is the number of oriented colorings of the edges of a regular n-dimensional simplex using exactly k colors. Row n has (n+1)*n/2 columns.

Original entry on oeis.org

1, 1, 2, 2, 1, 10, 54, 136, 150, 60, 1, 38, 1080, 14040, 85500, 274104, 493920, 504000, 272160, 60480, 1, 182, 42111, 2848060, 70361815, 841626366, 5722670282, 24262499520, 67665563280, 127639512000, 164044520640, 141664723200, 78702624000, 25427001600, 3632428800
Offset: 1

Views

Author

Robert A. Russell, Aug 19 2019

Keywords

Comments

An n-dimensional simplex has n+1 vertices and (n+1)*n/2 edges. For n=1, the figure is a line segment with one edge. For n=2, the figure is a triangle with three edges. For n=3, the figure is a tetrahedron with six edges. The Schläfli symbol {3,...,3}, of the regular n-dimensional simplex consists of n-1 threes. Two oriented colorings are the same if one is a rotation of the other; chiral pairs are counted as two.
T(n,k) is also the number of oriented colorings of (n-2)-dimensional regular simplices in an n-dimensional simplex using exactly k colors. Thus, T(2,k) is also the number of oriented colorings of the vertices (0-dimensional simplices) of an equilateral triangle.

Examples

			Triangle begins with T(1,1):
  1
  1  2    2
  1 10   54   136   150     60
  1 38 1080 14040 85500 274104 493920 504000 272160 60480
  ...
For T(2,1)=1, all edges of the triangle are the same color. For T(2,2)=2, the edges are AAB and ABB. For T(2,3)=2, the chiral pair is ABC-ACB.
		

Crossrefs

Cf. A327088 (unoriented), A327089 (chiral), A327090 (achiral), A327083 (up to k colors), A325002 (vertices and facets), A338113 (faces and peaks), A338142 (orthotope edges, orthoplex ridges), A338146 (orthoplex edges, orthotope ridges).

Programs

  • Mathematica
    CycleX[{2}] = {{1,1}}; (* cycle index for permutation with given cycle structure *)
    CycleX[{n_Integer}] := CycleX[n] = If[EvenQ[n], {{n/2,1}, {n,(n-2)/2}}, {{n,(n-1)/2}}]
    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)
    CycleX[p_List] := CycleX[p] = compress[Join[CycleX[Drop[p,-1]], If[Last[p] > 1, CycleX[{Last[p]}], ## &[]], If[# == Last[p], {#, Last[p]}, {LCM[#, Last[p]], GCD[#, Last[p]]}] & /@ Drop[p,-1]]]
    pc[p_List] := 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[CycleX[#]][[2]], 0] & /@ IntegerPartitions[n+1]]/((n+1)!/2)]
    array[n_, k_] := row[n] /. j -> k
    Table[LinearSolve[Table[Binomial[i,j], {i,1,(n+1)n/2}, {j,1,(n+1)n/2}], Table[array[n,k], {k,1,(n+1)n/2}]], {n,1,6}] // Flatten

Formula

The algorithm used in the Mathematica program below assigns each permutation of the vertices to a partition of n+1. It then determines the number of permutations for each partition and the cycle index for each partition.
A327083(n,k) = Sum_{j=1..(n+1)*n/2} T(n,j) * binomial(k,j).
T(n,k) = A327088(n,k) + A327089(n,k) = 2*A327088(n,k) - A327090(n,k) = 2*A327089(n,k) + A327090(n,k).
Showing 1-10 of 12 results. Next