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

A304972 Triangle read by rows of achiral color patterns (set partitions) for a row or loop of length n. T(n,k) is the number using exactly k colors (sets).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 3, 5, 2, 1, 1, 7, 10, 9, 3, 1, 1, 7, 19, 16, 12, 3, 1, 1, 15, 38, 53, 34, 18, 4, 1, 1, 15, 65, 90, 95, 46, 22, 4, 1, 1, 31, 130, 265, 261, 195, 80, 30, 5, 1, 1, 31, 211, 440, 630, 461, 295, 100, 35, 5, 1, 1, 63, 422, 1221, 1700, 1696, 1016, 515, 155, 45, 6, 1, 1, 63, 665, 2002
Offset: 1

Views

Author

Robert A. Russell, May 22 2018

Keywords

Comments

Two color patterns are equivalent if we permute the colors. Achiral color patterns must be equivalent if we reverse the order of the pattern.

Examples

			Triangle begins:
1;
1,   1;
1,   1,    1;
1,   3,    2,    1;
1,   3,    5,    2,     1;
1,   7,   10,    9,     3,     1;
1,   7,   19,   16,    12,     3,     1;
1,  15,   38,   53,    34,    18,     4,    1;
1,  15,   65,   90,    95,    46,    22,    4,    1;
1,  31,  130,  265,   261,   195,    80,   30,    5,    1;
1,  31,  211,  440,   630,   461,   295,  100,   35,    5,   1;
1,  63,  422, 1221,  1700,  1696,  1016,  515,  155,   45,   6,  1
1,  63,  665, 2002,  3801,  3836,  3156, 1556,  710,  185,  51,  6, 1;
1, 127, 1330, 5369, 10143, 13097, 10508, 6832, 2926, 1120, 266, 63, 7, 1;
For T(4,2)=3, the row patterns are AABB, ABAB, and ABBA.  The loop patterns are AAAB, AABB, and ABAB.
For T(5,3)=5, the color patterns for both rows and loops are AABCC, ABACA, ABBBC, ABCAB, and ABCBA.
		

Crossrefs

Columns 1-6 are A057427, A052551(n-2), A304973, A304974, A304975, A304976.
A305008 has coefficients that determine the function and generating function for each column.
Row sums are A080107.

Programs

  • Mathematica
    Ach[n_, k_] := Ach[n, k] = If[n < 2, Boole[n == k && n >= 0],
      k Ach[n - 2, k] + Ach[n - 2, k - 1] + Ach[n - 2, k - 2]]
    Table[Ach[n, k], {n, 1, 15}, {k, 1, n}] // Flatten
    Ach[n_, k_] := Ach[n, k] = Which[0==k, Boole[0==n], 1==k, Boole[n>0],
      OddQ[n], Sum[Binomial[(n-1)/2, i] Ach[n-1-2i, k-1], {i, 0, (n-1)/2}],
      True, 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}]]
    Table[Ach[n, k], {n, 1, 15}, {k, 1, n}] // Flatten
  • PARI
    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}
    { my(A=Ach(10)); for(n=1, #A, print(A[n,1..n])) } \\ Andrew Howroyd, Sep 18 2019

Formula

T(n,k) = [n>1] * (k*T(n-2,k) + T(n-2,k-1) + T(n-2,k-2)) + [n<2 & n==k & n>=0].
T(2m-1,k) = A140735(m,k).
T(2m,k) = A293181(m,k).
T(n,k) = [k==0 & n==0] + [k==1 & n>0]
+ [k>1 & n==1 mod 2] * Sum_{i=0..(n-1)/2} (C((n-1)/2, i) * T(n-1-2i, k-1))
+ [k>1 & n==0 mod 2] * Sum_{i=0..(n-2)/2} (C((n-2)/2, i) * (T(n-2-2i, k-1)
+ 2^i * T(n-2-2i, k-2))) where C(n,k) is a binomial coefficient.

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

A293181 Irregular triangle read by rows: T(n,k) is the number of k-partitions of {1..2n} that are invariant under a permutation consisting of n 2-cycles (1 <= k <= 2n).

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 1, 7, 10, 9, 3, 1, 1, 15, 38, 53, 34, 18, 4, 1, 1, 31, 130, 265, 261, 195, 80, 30, 5, 1, 1, 63, 422, 1221, 1700, 1696, 1016, 515, 155, 45, 6, 1, 1, 127, 1330, 5369, 10143, 13097, 10508, 6832, 2926, 1120, 266, 63, 7, 1
Offset: 1

Views

Author

Andrew Howroyd, Oct 01 2017

Keywords

Comments

See A002872 for detailed description.
T(m,k) is the number of achiral color patterns in a row or loop of length 2m using exactly k different colors. Two color patterns are equivalent if we permute the colors. - Robert A. Russell, Apr 24 2018
T(n,k) = coefficient of x^k for A(2,n)(x) in Gilbert and Riordan's article. - Robert A. Russell, Jun 14 2018

Examples

			Triangle begins:
  1,   1;
  1,   3,    2,    1;
  1,   7,   10,    9,     3,     1;
  1,  15,   38,   53,    34,    18,     4,    1;
  1,  31,  130,  265,   261,   195,    80,   30,    5,    1;
  1,  63,  422, 1221,  1700,  1696,  1016,  515,  155,   45,   6,  1;
  1, 127, 1330, 5369, 10143, 13097, 10508, 6832, 2926, 1120, 266, 63, 7, 1;
  ...
For T(2,2)=3, the row patterns are AABB, ABAB, and ABBA.  The loop patterns are AAAB, AABB, and ABAB. - _Robert A. Russell_, Apr 24 2018
		

Crossrefs

Row sums are A002872.
Maximum row values are A002873.
Number of achiral color patterns of length odd n in A140735.
Column k=3 gives A056182.

Programs

  • Mathematica
    (* Ach[n, k] is the number of achiral color patterns for a row or loop of n
      colors containing k different colors *)
    Ach[n_, k_] := Ach[n, k] = Which[0==k, Boole[0==n], 1==k, Boole[n>0],
      OddQ[n], Sum[Binomial[(n-1)/2, i] Ach[n-1-2i, k-1], {i, 0, (n-1)/2}],
      True, 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}]]
    Table[Ach[n, k], {n, 2, 14, 2}, {k, 1, n}] // Flatten
    (* Robert A. Russell, Feb 06 2018 *)
    Table[Drop[MatrixPower[Table[Switch[j-i, 0, i-1, 1, 1, 2, 1, _, 0],
      {i, 1, 2n+1}, {j, 1, 2n+1}], n][[1]], 1], {n, 1, 10}] // Flatten
    (* Robert A. Russell, Apr 14 2018 *)
    Aeven[m_, k_] := Aeven[m, k] = If[m>0, k Aeven[m-1, k] + Aeven[m-1, k-1]
      + Aeven[m-1, k-2], Boole[m == 0 && k == 0]]
    Table[Aeven[m, k], {m, 1, 10}, {k, 1, 2m}] // Flatten (* Robert A. Russell, Apr 24 2018 *)
  • PARI
    \\ see A056391 for Polya enumeration functions
    T(n,k) = 2*NonequivalentStructsExactly(CylinderPerms(2,n),k) - stirling(2*n,k,2);
    
  • PARI
    seq(n)={Vec(serlaplace(exp(y*(exp(x + O(x*x^n))-1)+(1/2)*y^2*(exp(2*x + O(x*x^n))-1))) - 1)}
    {my(T=seq(10)); for(n=1, #T, for(k=1, 2*n, print1(polcoeff(T[n], k), ", ")); print)} \\ Andrew Howroyd, Jan 31 2018

Formula

T(n,k) = coefficient of t^k x^n/n! in exp(t*(exp(x)-1)+(1/2)*t^2*(exp(2*x)-1)). - Ira M. Gessel, Jan 30 2018
T(m,k) = [m>0]*(k*T(m-1,k)+T(m-1,k-1)+T(m-1,k-2)) + [m==0]*[k==0]. - Robert A. Russell, Apr 24 2018
Conjecture: T(n,k) = R(n,k)-R(n,k-1), with R(n,k) = Sum_{m=0..k} m^n*A000085(m)*A038205(k-m)/(m!*(k-m)!). - Mikhail Kurkov, Jun 26 2018

A182522 a(0) = 1; thereafter a(2*n + 1) = 3^n, a(2*n + 2) = 2 * 3^n.

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486, 729, 1458, 2187, 4374, 6561, 13122, 19683, 39366, 59049, 118098, 177147, 354294, 531441, 1062882, 1594323, 3188646, 4782969, 9565938, 14348907, 28697814, 43046721, 86093442, 129140163, 258280326, 387420489
Offset: 0

Views

Author

Michael Somos, May 03 2012

Keywords

Comments

Row sums of triangle in A123149. - Philippe Deléham, May 04 2012
This is simply the classic sequence A038754 prefixed by a 1. - N. J. A. Sloane, Nov 23 2017
Binomial transform is A057960.
Range of row n of the circular Pascal array of order 6. - Shaun V. Ault, May 30 2014
a(n) is also the number of achiral color patterns in a row or cycle of length n using three or fewer colors. Two color patterns are the same if we permute the colors, so ABCAB=BACBA. For a cycle, we can rotate the colors, so ABCAB=CABAB. A row is achiral if it is the same as some color permutation of its reverse. Thus the reversal of ABCAB is BACBA, which is equivalent to ABCAB when we permute A and B. A cycle is achiral if it is the same as some rotation of some color permutation of its reverse. Thus CABAB reversed is BABAC. We can permute A and B to get ABABC and then rotate to get CABAB, so CABAB is achiral. It is interesting that the number of achiral color patterns is the same for rows and cycles. - Robert A. Russell, Mar 10 2018
Also, the number of walks of length n on the graph 0--1--2--3--4 starting at vertex 0. - Sean A. Irvine, Jun 03 2025

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 6*x^4 + 9*x^5 + 18*x^6 + 27*x^7 + 54*x^8 + ...
From _Robert A. Russell_, Mar 10 2018: (Start)
For a(4) = 6, the achiral color patterns for rows are AAAA, AABB, ABAB, ABBA, ABBC, and ABCA.  Note that for cycles AABB=ABBA and ABBC=ABCA.  The achiral patterns for cycles are AAAA, AAAB, AABB, ABAB, ABAC, and ABBC.  Note that AAAB and ABAC are not achiral rows.
For a(5) = 9, the achiral color patterns (for both rows and cycles) are AAAAA, AABAA, ABABA, ABBBA, AABCC, ABACA, ABBBC, ABCAB, and ABCBA. (End)
		

Crossrefs

Cf. A038754 (essentially the same sequence).
Also row sums of triangle in A169623.
Column 3 of A305749.
Cf. A124302 (oriented), A001998 (unoriented), A107767 (chiral), for rows, varying offsets.
Cf. A002076 (oriented), A056353 (unoriented), A320743 (chiral), for cycles.

Programs

  • Magma
    I:=[1,1,2]; [n le 3 select I[n] else 3*Self(n-2): n in [1..40]]; // Bruno Berselli, Mar 19 2013
    
  • Mathematica
    Join[{1}, RecurrenceTable[{a[1]==1, a[2]==2, a[n]==3 a[n-2]}, a, {n, 40}]] (* Bruno Berselli, Mar 19 2013 *)
    CoefficientList[Series[(1+x-x^2)/(1-3*x^2), {x,0,50}], x] (* G. C. Greubel, Apr 14 2017 *)
    Table[If[EvenQ[n], StirlingS2[(n+6)/2,3] - 4 StirlingS2[(n+4)/2,3] + 5 StirlingS2[(n+2)/2,3] - 2 StirlingS2[n/2,3], StirlingS2[(n+5)/2,3] - 3 StirlingS2[(n+3)/2,3] + 2 StirlingS2[(n+1)/2,3]], {n,0,40}] (* Robert A. Russell, Oct 21 2018 *)
    Join[{1},Table[If[EvenQ[n], 2 3^((n-2)/2), 3^((n-1)/2)],{n,40}]] (* Robert A. Russell, Oct 28 2018 *)
  • Maxima
    makelist(if n=0 then 1 else (1+mod(n-1,2))*3^floor((n-1)/2), n, 0, 40); /* Bruno Berselli, Mar 19 2013 */
    
  • PARI
    {a(n) = if( n<1, n==0, n--; (n%2 + 1) * 3^(n \ 2))}
    
  • PARI
    my(x='x+O('x^50)); Vec((1+x-x^2)/(1-3*x^2)) \\ G. C. Greubel, Apr 14 2017
    
  • SageMath
    def A182522(n): return (3 -(3-2*sqrt(3))*((n+1)%2))*3^((n-3)/2) + int(n==0)/3
    [A182522(n) for n in range(41)] # G. C. Greubel, Jul 17 2023

Formula

G.f.: (1 + x - x^2) / (1 - 3*x^2).
Expansion of 1 / (1 - x / (1 - x / (1 + x / (1 + x)))) in powers of x.
a(n+1) = A038754(n).
a(n) = Sum_{k=0..n} A123149(n,k). - Philippe Deléham, May 04 2012
a(n) = (3-(1+(-1)^n)*(3-2*sqrt(3))/2)*sqrt(3)^(n-3) for n>0, a(0)=1. - Bruno Berselli, Mar 19 2013
a(0) = 1, a(1) = 1, a(n) = a(n-1) + a(n-2) if n is odd, and a(n) = a(n-1) + a(n-2) + a(n-3) if n is even. - Jon Perry, Mar 19 2013
For odd n = 2m-1, a(2m-1) = T(m,1)+T(m,2)+T(m,3) for triangle T(m,k) of A140735; for even n = 2m, a(2m) = T(m,1)+T(m,2)+T(m,3) for triangle T(m,k) of A293181. - Robert A. Russell, Mar 10 2018
From Robert A. Russell, Oct 21 2018: (Start)
a(2m) = S2(m+3,3) - 4*S2(m+2,3) + 5*S2(m+1,3) - 2*S2(m,3).
a(2m-1) = S2(m+2,3) - 3*S2(m+1,3) + 2*S2(m,3), where S2(n,k) is the Stirling subset number A008277.
a(n) = 2*A001998(n-1) - A124302(n) = A124302(n) - 2*A107767(n-1) = A001998(n-1) - A107767(n-1).
a(n) = 2*A056353(n) - A002076(n) = A002076(n) - 2*A320743(n) = A056353(n) - A320743(n).
a(n) = A057427(n) + A052551(n-2) + A304973(n). (End)

Extensions

Edited by Bruno Berselli, Mar 19 2013
Definition simplified by N. J. A. Sloane, Nov 23 2017

A304973 Number of achiral color patterns (set partitions) for a row or loop of length n using exactly 3 colors (sets).

Original entry on oeis.org

0, 0, 0, 1, 2, 5, 10, 19, 38, 65, 130, 211, 422, 665, 1330, 2059, 4118, 6305, 12610, 19171, 38342, 58025, 116050, 175099, 350198, 527345, 1054690, 1586131, 3172262, 4766585, 9533170, 14316139, 28632278, 42981185, 85962370, 129009091, 258018182, 387158345, 774316690, 1161737179, 2323474358
Offset: 0

Views

Author

Robert A. Russell, May 22 2018

Keywords

Comments

Two color patterns are equivalent if we permute the colors. Achiral color patterns must be equivalent if we reverse the order of the pattern.

Examples

			For a(5) = 5, the color patterns for both rows and loops are AABCC, ABACA, ABBBC, ABCAB, and ABCBA.
		

Crossrefs

Third column of A304972.
Third column of A140735 for odd n.
Third column of A293181 for even n.
Coefficients that determine the first formula and generating function are row 3 of A305008.

Programs

  • Mathematica
    Table[If[EvenQ[n], 2 StirlingS2[n/2+1, 3] - 2 StirlingS2[n/2, 3], StirlingS2[(n + 3)/2, 3] - StirlingS2[(n + 1)/2, 3]], {n, 0, 30}]
    Join[{0}, LinearRecurrence[{0, 5, 0, -6}, {0, 0, 1, 2}, 40]] (* Robert A. Russell, Oct 14 2018 *)

Formula

a(n) = [n==0 mod 2] * (2*S2(n/2+1, 3) - 2*S2(n/2, 3)) + [n==1 mod 2] * (S2((n+3)/2, 3) - S2((n+1)/2, 3)) where S2(n,k) is the Stirling subset number A008277(n,k).
G.f.: x^3 * (1+2x) / ((1-2x^2) * (1-3x^2)).
a(n) = A304972(n,3).
a(2m-1) = A140735(m,3).
a(2m) = A293181(m,3).

A304974 Number of achiral color patterns (set partitions) for a row or loop of length n using exactly 4 colors (sets).

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 9, 16, 53, 90, 265, 440, 1221, 2002, 5369, 8736, 22933, 37130, 96105, 155080, 397541, 640002, 1629529, 2619056, 6636213, 10653370, 26899145, 43144920, 108659461, 174174002, 437826489, 701478976, 1760871893, 2820264810, 7072185385, 11324105960, 28374834981, 45425564002, 113757620249
Offset: 0

Views

Author

Robert A. Russell, May 22 2018

Keywords

Comments

Two color patterns are equivalent if we permute the colors. Achiral color patterns must be equivalent if we reverse the order of the pattern.

Examples

			For a(6) = 9, the row color patterns are AABCDD, ABACDC, ABBCCD, ABCADC, ABCBCD, ABCCBD, ABCCDA, ABCDAB, and ABCBCD.  The loop color patterns are AAABCD, AABBCD, AABCCD, AABCDB, ABABCD, ABACAD, ABACBD, ABACDC, and ABCADC.
		

Crossrefs

Fourth column of A304972.
Fourth column of A140735 for odd n.
Fourth column of A293181 for even n.
Coefficients that determine the first formula and generating function are row 4 of A305008.

Programs

  • Magma
    I:=[0,0,0,1,2]; [0] cat [n le 5 select I[n] else Self(n-1) +7*Self(n-2) -7*Self(n-3) -12*Self(n-4) +12*Self(n-5): n in [1..40]]; // G. C. Greubel, Oct 17 2018
  • Mathematica
    Table[If[EvenQ[n], StirlingS2[n/2 + 2, 4] - StirlingS2[n/2 + 1, 4] - 2 StirlingS2[n/2, 4], 2 StirlingS2[(n + 3)/2, 4] - 4 StirlingS2[(n + 1)/2, 4]], {n, 0, 40}]
    Join[{0}, LinearRecurrence[{1, 7, -7, -12, 12}, {0, 0, 0, 1, 2}, 40]] (* Robert A. Russell, Oct 14 2018 *)
  • PARI
    m=40; v=concat([0,0,0,1,2], vector(m-5)); for(n=6, m, v[n] = v[n-1] +7*v[n-2] -7*v[n-3] -12*v[n-4] +12*v[n-5]); concat([0], v) \\ G. C. Greubel, Oct 17 2018
    

Formula

a(n) = [n==0 mod 2] * (S2(n/2+2, 4) - S2(n/2+1, 4) - 2*S2(n/2, 4)) + [n==1 mod 2] * (2*S2((n+3)/2, 4) - 4*S2((n+1)/2, 4)) where S2(n,k) is the Stirling subset number A008277(n,k).
G.f.: x^4 * (1+x)^2 * (1-2x^2) / Product_{k=1..4} (1 - k*x^2).
a(n) = A304972(n,4).
a(2m-1) = A140735(m,4).
a(2m) = A293181(m,4).

A080337 Bisection of A080107.

Original entry on oeis.org

1, 3, 12, 59, 339, 2210, 16033, 127643, 1103372, 10269643, 102225363, 1082190554, 12126858113, 143268057587, 1778283994284, 23120054355195, 314017850216371, 4444972514600178, 65435496909148513, 999907522895563403, 15832873029742458796, 259377550023571768075
Offset: 1

Views

Author

Wouter Meeussen, Mar 18 2003

Keywords

Comments

Number of symmetric positions of non-attacking rooks on upper-diagonal part of 2n X 2n chessboard.
Number of length-n restricted growth strings (RGS) [s(0),s(1),...,s(n-1)] where s(0)=0 and s(k)<=2+max(prefix) for k>=1, see example. - Joerg Arndt, Apr 25 2010
Number of achiral color patterns in a row or loop of length 2n-1. Two color patterns are equivalent if the colors are permuted. - Robert A. Russell, Apr 24 2018
Stirling transform of A005425(n-1) per Knuth reference. - Robert A. Russell, Apr 28 2018

Examples

			From _Joerg Arndt_, Apr 25 2010: (Start)
For n=0 there is one empty string (term a(0)=0 not included here); for n=1 there is one string [0]; for n=2 there are 3 strings [00], [01], and [02];
for n=3 there are a(3)=12 strings (in lexicographic order):
01: [000],
02: [001],
03: [002],
04: [010],
05: [011],
06: [012],
07: [013],
08: [020],
09: [021],
10: [022],
11: [023],
12: [024].
(End)
For a(3) = 12, both the row and loop patterns are AAAAA, AABAA, ABABA, ABBBA, AABCC, ABACA, ABBBC, ABCAB, ABCBA, ABCBD, ABCDA, and ABCDE. - _Robert A. Russell_, Apr 24 2018
		

References

  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.5 (p. 765). - Robert A. Russell, Apr 28 2018

Crossrefs

Row sums of A140735.
Column k=2 of A305962.

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, 1,
          add(b(n-1, max(m, j)), j=1..m+2))
        end:
    a:= n-> b(n, -1):
    seq(a(n), n=1..25);  # Alois P. Heinz, Jun 15 2018
  • Mathematica
    Table[Sum[ Binomial[n, k] A002872[[k + 1]], {k, 0, n}], {n, 0, 24}]
    Aodd[m_, k_] := Aodd[m, k] = If[m > 1, k Aodd[m-1, k] + Aodd[m-1, k-1]
      + Aodd[m-1, k-2], Boole[m==1 && k==1]]
    Table[Sum[Aodd[m, k], {k, 1, 2m-1}], {m, 1, 30}] (* Robert A. Russell, Apr 24 2018 *)
    x[n_] := x[n] = If[n<2, n+1, 2x[n-1] + (n-1) x[n-2]]; (* A005425 *)
    Table[Sum[StirlingS2[n, k] x[k-1], {k, 0, n}], {n, 30}] (* Robert A. Russell, Apr 28 2018, after Knuth reference *)
  • PARI
    x='x+O('x^66);
    egf=exp(x+exp(x)+exp(2*x)/2-3/2); /* = 1 +3*x +6*x^2 +59/6*x^3 +113/8*x^4 +... */
    Vec(serlaplace(egf)) /* Joerg Arndt, Apr 29 2011 */

Formula

Binomial transform of A002872 (sorting numbers).
E.g.f.: exp(x+exp(x)+exp(2*x)/2-3/2) = exp(x+sum(j=1,2, (exp(j*x)-1)/j ) ). - Joerg Arndt, Apr 29 2011
From Robert A. Russell, Apr 24 2018: (Start)
Aodd[n,k] = [n>1]*(k*Aodd[n-1,k]+Aodd[n-1,k-1]+Aodd[n-1,k-2])+[n==1]*[k==1]
a(n) = Sum_{k=1..2n-1} Aodd[n,k]. (End)
a(n) = Sum_{k=0..n} Stirling2(n, k)*A005425(k-1). (from Knuth reference) - Robert A. Russell, Apr 28 2018

Extensions

Comment corrected by Wouter Meeussen, Aug 14 2009

A304975 Number of achiral color patterns (set partitions) for a row or loop of length n using exactly 5 colors (sets).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 3, 12, 34, 95, 261, 630, 1700, 3801, 10143, 21672, 57414, 119155, 314121, 639210, 1679320, 3370301, 8832483, 17549532, 45907994, 90541815, 236526381, 463889790, 1210585740, 2364180001, 6164760423, 11999840592, 31271161774, 60714998075, 158145313041, 306438236370, 797884712960
Offset: 0

Views

Author

Robert A. Russell, May 22 2018

Keywords

Comments

Two color patterns are equivalent if we permute the colors. Achiral color patterns must be equivalent if we reverse the order of the pattern.

Examples

			For a(6) = 3, the color patterns for both rows and loops are ABCCDE, ABCDBE, and ABCDEA.
		

Crossrefs

Fifth column of A304972.
Fifth column of A140735 for odd n.
Fifth column of A293181 for even n.
Coefficients that determine the first formula and generating function are row 5 of A305008.

Programs

  • Magma
    I:=[0,0,0,0,1,3,12]; [0] cat [n le 7 select I[n] else Self(n-1) +11*Self(n-2) -11*Self(n-3) -38*Self(n-4) +38*Self(n-5) +40*Self(n-6) -40*Self(n-7): n in [1..40]]; // G. C. Greubel, Oct 16 2018
  • Mathematica
    Table[If[EvenQ[n], 3 StirlingS2[n/2+2, 5] - 11 StirlingS2[n/2+1, 5] + 6 StirlingS2[n/2, 5], StirlingS2[(n+5)/2, 5] - 3 StirlingS2[(n+3)/2, 5]], {n, 0, 40}]
    Join[{0}, LinearRecurrence[{1, 11, -11, -38, 38, 40, -40}, {0, 0, 0, 0, 1, 3, 12}, 40]] (* Robert A. Russell, Oct 14 2018 *)
    CoefficientList[Series[x^5 *(1 + x)*(1 - 3*x^2)*(1 + 2*x - 2*x^2) / Product[1 - k*x^2, {k,1,5}], {x, 0, 50}],x] (* Stefano Spezia, Oct 16 2018 *)
  • PARI
    m=40; v=concat([0,0,0,0,1,3,12], vector(m-7)); for(n=8, m, v[n] = v[n-1] +11*v[n-2] -11*v[n-3] -38*v[n-4] +38*v[n-5] +40*v[n-6] -40*v[n-7] ); concat([0], v) \\ G. C. Greubel, Oct 16 2018
    

Formula

a(n) = [n==0 mod 2] * (3*S2(n/2+2, 5) - 11*S2(n/2+1, 5) + 6*S2(n/2, 5)) + [n==1 mod 2] * (S2((n+5)/2, 5) - 3*S2((n+3)/2, 5)) where S2(n,k) is the Stirling subset number A008277(n,k).
G.f.: x^5 *(1 + x)*(1 - 3*x^2)*(1 + 2*x - 2*x^2) / Product_{k=1..5} (1 - k*x^2).
a(n) = A304972(n,5).
a(2m-1) = A140735(m,5).
a(2m) = A293181(m,5).

A304976 Number of achiral color patterns (set partitions) for a row or loop of length n using exactly 6 colors (sets).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 3, 18, 46, 195, 461, 1696, 3836, 13097, 28819, 94094, 203322, 644911, 1376217, 4279692, 9051592, 27755013, 58319855, 176992090, 370087718, 1114496747, 2321721493, 6950406008, 14437363668, 43021681249, 89162536011, 264732674406, 547676535634
Offset: 0

Views

Author

Robert A. Russell, May 22 2018

Keywords

Comments

Two color patterns are equivalent if we permute the colors. Achiral color patterns must be equivalent if we reverse the order of the pattern.

Examples

			For a(7) = 3, the color patterns for both rows and loops are ABCDCEF, ABCDEBF, and ABCDEFA.
		

Crossrefs

Sixth column of A304972.
Sixth column of A140735 for odd n.
Sixth column of A293181 for even n.
Coefficients that determine the first formula and generating function are row 6 of A305008.

Programs

  • Magma
    I:=[0,0,0,0,0,1,3,18,46]; [0] cat [n le 9 select I[n] else Self(n-1) +16*Self(n-2) -16*Self(n-3) -91*Self(n-4) +91*Self(n-5) +216*Self(n-6) -216*Self(n-7) -180*Self(n-8) +180*Self(n-9): n in [1..40]]; // G. C. Greubel, Oct 16 2018
  • Mathematica
    Table[If[EvenQ[n], StirlingS2[n/2 + 3, 6] - 3 StirlingS2[n/2 + 2, 6] - 8 StirlingS2[n/2 + 1, 6] + 16 StirlingS2[n/2, 6], 3 StirlingS2[(n + 5)/2, 6] - 17 StirlingS2[(n + 3)/2, 6] + 20 StirlingS2[(n + 1)/2, 6]], {n, 0, 40}]
    Join[{0}, LinearRecurrence[{1, 16, -16, -91, 91, 216, -216, -180, 180}, {0, 0, 0, 0, 0, 1, 3, 18, 46}, 40]] (* Robert A. Russell, Oct 14 2018 *)
    CoefficientList[Series[x^6 *(1+x)*(1-4*x^2)*(1+2*x-x^2-4*x^3) / Product[1 - k*x^2, {k,1,6}], {x, 0, 50}], x] (* Stefano Spezia, Oct 20 2018 *)
  • PARI
    m=40; v=concat([0,0,0,0,0,1,3,18,46], vector(m-9)); for(n=10, m, v[n] = v[n-1] +16*v[n-2] -16*v[n-3] -91*v[n-4] +91*v[n-5] +216*v[n-6] -216*v[n-7] -180*v[n-8] +180*v[n-9]); concat([0], v) \\ G. C. Greubel, Oct 16 2018
    

Formula

a(n) = [n==0 mod 2] * (S2(n/2+3, 6) - 3*S2(n/2+2, 6) - 8*S2(n/2+1, 6) + 16*S2(n/2, 6)) + [n==1 mod 2] * (3*S2((n+5)/2, 6) - 17*S2((n+3)/2, 6) + 20*S2((n+1)/2, 6 )) where S2(n,k) is the Stirling subset number A008277(n,k).
G.f.: x^6 *(1+x)*(1-4*x^2)*(1+2*x-x^2-4*x^3) / Product_{k=1..6} (1 - k*x^2).
a(n) = A304972(n,6).
a(2m-1) = A140735(m,6).
a(2m) = A293181(m,6).

A140733 Triangle read by rows, X^n * [1,0,0,0,...]; where X = a tridiagonal matrix with (1,1,1,...) in the main and subdiagonals and (1,2,3,...) in the subsubdiagonal.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 3, 3, 1, 3, 6, 10, 15, 15, 15, 1, 4, 10, 22, 43, 70, 105, 105, 105, 1, 5, 15, 40, 95, 201, 390, 630, 945, 945, 945, 1, 6, 21, 65, 180, 456, 1066, 2226, 4305, 6930, 10395, 10395, 10395, 1, 7, 28, 98, 308, 896, 2422, 6028, 13993, 29043, 56070, 90090
Offset: 1

Views

Author

Keywords

Comments

Rightmost terms of each row form A001147: (1, 1, 3, 15, 105, 945,...).

Examples

			First few rows of the triangle are:
1;
1, 1, 1;
1, 2, 3, 3, 3;
1, 3, 6, 10, 15, 15, 15;
1, 4, 10, 22, 43, 70, 105, 105, 105;
1, 5, 15, 40, 95, 201, 390, 630, 945, 945, 945;
1, 6, 21, 65, 180, 456, 1066, 2226, 4305, 6930, 10395, 10395, 10395;
...
		

Crossrefs

Showing 1-10 of 11 results. Next