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-9 of 9 results.

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.

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

A056327 Number of reversible string structures with n beads using exactly three different colors.

Original entry on oeis.org

0, 0, 1, 4, 15, 50, 160, 502, 1545, 4730, 14356, 43474, 131145, 395150, 1188580, 3572902, 10732065, 32225810, 96733636, 290322394, 871200825, 2614097750, 7843255300, 23531775502, 70599259185, 211805902490
Offset: 1

Views

Author

Keywords

Comments

A string and its reverse are considered to be equivalent. Permuting the colors will not change the structure.
Number of set partitions for an unoriented row of n elements using exactly three different elements. An unoriented row is equivalent to its reverse. - Robert A. Russell, Oct 14 2018

Examples

			For a(4)=4, the color patterns are ABCA, ABBC, AABC, and ABAC. The first two are achiral. - _Robert A. Russell_, Oct 14 2018
		

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

Column 3 of A284949.
Cf. A056310.
Cf. A000392 (oriented), A320526 (chiral), A304973 (achiral).

Programs

  • Magma
    I:=[0,0,1,4,15,50,160]; [n le 7 select I[n] else 6*Self(n-1) -6*Self(n-2) -24*Self(n-3) +49*Self(n-4) +6*Self(n-5) -66*Self(n-6) +36*Self(n-7): n in [1..40]]; // G. C. Greubel, Oct 16 2018
  • Mathematica
    k=3; Table[(StirlingS2[n,k] + If[EvenQ[n], 2StirlingS2[n/2+1,3] - 2StirlingS2[n/2,3], StirlingS2[(n+3)/2,3] - StirlingS2[(n+1)/2,3]])/2, {n,30}] (* Robert A. Russell, Oct 15 2018 *)
    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]]
    k=3; Table[(StirlingS2[n, k] + Ach[n, k])/2, {n,30}] (* Robert A. Russell, Oct 15 2018 *)
    LinearRecurrence[{6, -6, -24, 49, 6, -66, 36}, {0, 0, 1, 4, 15, 50, 160}, 30] (* Robert A. Russell, Oct 15 2018 *)
  • PARI
    m=40; v=concat([0,0,1,4,15,50,160], vector(m-7)); for(n=8, m, v[n] = 6*v[n-1] -6*v[n-2] -24*v[n-3] +49*v[n-4] +6*v[n-5] -66*v[n-6] +36*v[n-7] ); v \\ G. C. Greubel, Oct 16 2018
    

Formula

a(n) = A001998(n-1) - A005418(n).
G.f.: x^3*(3*x^4 - 8*x^3 + 3*x^2 + 2*x - 1)/((x-1)*(2*x-1)*(3*x-1)*(2*x^2-1)*(3*x^2-1)). - Colin Barker, Sep 23 2012
From Robert A. Russell, Oct 14 2018: (Start)
a(n) = (S2(n,k) + A(n,k))/2, where k=3 is the number of colors (sets), S2 is the Stirling subset number A008277 and A(n,k) = [n>1] * (k*A(n-2,k) + A(n-2,k-1) + A(n-2,k-2)) + [n<2 & n==k & n>=0].
a(n) = (A000392(n) + A304973(n)) / 2 = A000392(n) - A320526(n) = A320526(n) + A304973(n). (End)

A305750 Number of achiral color patterns (set partitions) in a row or cycle of length n with 4 or fewer colors (subsets).

Original entry on oeis.org

1, 1, 2, 3, 7, 11, 27, 43, 107, 171, 427, 683, 1707, 2731, 6827, 10923, 27307, 43691, 109227, 174763, 436907, 699051, 1747627, 2796203, 6990507, 11184811, 27962027, 44739243, 111848107, 178956971, 447392427, 715827883, 1789569707, 2863311531, 7158278827
Offset: 0

Views

Author

Robert A. Russell, Jun 09 2018

Keywords

Comments

An equivalent color pattern is obtained when we permute the colors. Thus all permutations of ABCD are equivalent, as are AABCD and BBCDA. A color pattern is achiral if it is equivalent to its reversal. Rotations of the colors of a cycle are equivalent, so for cycles AABBCD = BBCDAA = CDAABB.

Examples

			For a(4) = 7, the achiral row patterns are AAAA, AABB, ABAB, ABBA, ABBC, ABCA, and ABCD. The cycle patterns are AAAA, AAAB, AABB, ABAB, AABC, ABAC, and ABCD.
		

Crossrefs

Fourth column of A305749.
Cf. A124303 (oriented), A056323 (unoriented), A320934 (chiral), for rows.
Cf. A056292 (oriented), A056354 (unoriented), A320744 (chiral), for cycles.

Programs

  • GAP
    a:=[1,2,3];; for n in [4..40] do a[n]:=a[n-1]+4*a[n-2]-4*a[n-3]; od; Concatenation([1],a); # Muniru A Asiru, Oct 28 2018
  • Maple
    seq(coeff(series((1-3*x^2+x^3)/((1-x)*(1-4*x^2)),x,n+1), x, n), n = 0 .. 40); # Muniru A Asiru, Oct 28 2018
  • Mathematica
    Table[If[EvenQ[n], StirlingS2[(n+8)/2, 4] - 8 StirlingS2[(n+6)/2, 4] + 22 StirlingS2[(n+4)/2, 4] - 23 StirlingS2[(n+2)/2, 4] + 6 StirlingS2[n/2, 4], StirlingS2[(n+7)/2, 4] - 7 StirlingS2[(n+5)/2, 4] + 16 StirlingS2[(n+3)/2, 4] - 12 StirlingS2[(n+1)/2, 4]], {n, 0, 40}]
    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]]; (* A304972 *)
    k=4; Table[Sum[Ach[n, j], {j, 0, k}], {n, 0, 40}]
    (* or *)
    CoefficientList[Series[(1-3x^2+x^3)/((1-x)(1-4x^2)), {x,0,40}], x]
    (* or *)
    Join[{1},LinearRecurrence[{1,4,-4},{1,2,3},40]]
    (* or *)
    Join[{1},Table[If[EvenQ[n], (4+5 4^(n/2))/12, (2+4^((n+1)/2))/6], {n,40}]]

Formula

a(n) = Sum_{j=0..4} Ach(n,j), where Ach(n,k) = [n>1] * (k*T(n-2,k) + T(n-2,k-1) + T(n-2,k-2)) + [0<=n<2 & n==k].
G.f.: (1 - 3x^2 + x^3) / ((1-x) * (1-4x^2)).
a(2m) = S2(m+4,4) - 8*S2(m+3,4) + 22*S2(m+2,4) - 23*S2(m+1,4) + 6*S2(m,4);
a(2m-1) = S2(m+3,4) - 7*S2(m+2,4) + 16*S2(m+1,4) - 12*S2(m,4), where S2(n,k) is the Stirling subset number A008277.
For m>0, a(2m) = (4 + 5*4^m) / 12.
a(2m-1) = (2 + 4^m) / 6.
a(n) = 2*A056323(n) - A124303(n) = A124303(n) - 2*A320934(n) = A056323(n) - A320934(n).
a(n) = 2*A056354(n) - A056292(n) = A056292(n) - 2*A320744(n) = A056354(n) - A320744(n).
a(n) = A057427(n) + A052551(n-2) + A304973(n) + A304974(n).
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3). - Muniru A Asiru, Oct 28 2018

A320526 a(n) is the number of chiral pairs of color patterns (set partitions) in a row of length n using exactly 3 colors (subsets).

Original entry on oeis.org

0, 0, 0, 2, 10, 40, 141, 464, 1480, 4600, 14145, 43052, 130480, 393820, 1186521, 3568784, 10725760, 32213200, 96714465, 290284052, 871142800, 2613981700, 7843080201, 23531425304, 70598731840, 211804847800, 635432109585, 1906330676252, 5719061512720, 17157321139180
Offset: 1

Views

Author

Robert A. Russell, Oct 14 2018

Keywords

Comments

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

Examples

			For a(4)=2, the two chiral pairs are AABC-ABCC and ABAC-ABCB.
		

Crossrefs

Column 3 of A320525.
Cf. A000392 (oriented), A056327 (unoriented), A304973 (achiral).

Programs

  • Magma
    I:=[0,0,0,2,10,40,141]; [n le 7 select I[n] else 6*Self(n-1) -6*Self(n-2) -24*Self(n-3) +49*Self(n-4) +6*Self(n-5) -66*Self(n-6) +36*Self(n-7): n in [1..40]]; // G. C. Greubel, Oct 16 2018
  • Mathematica
    k=3; Table[(StirlingS2[n,k] - If[EvenQ[n], 2StirlingS2[n/2+1,3] - 2StirlingS2[n/2,3], StirlingS2[(n+3)/2,3] - StirlingS2[(n+1)/2,3]])/2, {n, 1, 30}]
    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]] (* A304972 *)
    k = 3; Table[(StirlingS2[n, k] - Ach[n, k])/2, {n, 1, 30}]
    LinearRecurrence[{6, -6, -24, 49, 6, -66, 36}, {0, 0, 0, 2, 10, 40,
      141}, 40]
  • PARI
    m=40; v=concat([0,0,0,2,10,40,141], vector(m-7)); for(n=8, m, v[n] = 6*v[n-1] -6*v[n-2] -24*v[n-3] +49*v[n-4] +6*v[n-5] -66*v[n-6] +36*v[n-7] ); v \\ G. C. Greubel, Oct 16 2018
    

Formula

a(n) = (S2(n,k) - A(n,k))/2, where k=3 is the number of colors (sets), S2 is the Stirling subset number A008277 and A(n,k) = [n>1] * (k*A(n-2,k) + A(n-2,k-1) + A(n-2,k-2)) + [n<2 & n==k & n>=0].
G.f.: (x^3 / Product_{k=1..3} (1 - k*x) - x^3*(1 + 2 x)/((1 - 2 x^2)*(1 - 3 x^2))) / 2.
a(n) = (A000392(n) - A304973(n)) / 2 = A000392(n) - A056327(n) = A056327(n) - A304973(n).

A320643 Number of chiral pairs of color patterns (set partitions) in a cycle of length n using exactly 3 colors (subsets).

Original entry on oeis.org

0, 0, 0, 0, 0, 4, 12, 44, 137, 408, 1190, 3416, 9730, 27560, 78148, 221250, 627960, 1784038, 5081154, 14496956, 41455409, 118764600, 340919744, 980315700, 2823696150, 8145853520, 23533759241, 68081765650, 197206716570, 571906256808, 1660387879116, 4825525985408, 14037945170525, 40875277302720, 119122416494961, 347440682773324, 1014151818975190, 2962391932326680, 8659301777595196, 25328461701728194
Offset: 1

Views

Author

Robert A. Russell, Oct 18 2018

Keywords

Comments

Two color patterns are the same if the colors are permuted. A chiral cycle is different from its reverse.
Adnk[d,n,k] in Mathematica program is coefficient of x^k in A(d,n)(x) in Gilbert and Riordan reference.
There are nonrecursive formulas, generating functions, and computer programs for A056296 and A304973, which can be used in conjunction with the first formula.

Examples

			For a(6)=4, the chiral pairs are AAABBC-AAABCC, AABABC-AABCAC, AABACB-AABCAB, and AABACC-AABBAC.
		

Crossrefs

Column 3 of A320647.
Cf. A056296 (oriented), A056358 (unoriented), A304973 (achiral).

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]] (* A304972 *)
    Adnk[d_,n_,k_] := Adnk[d,n,k] = If[n>0 && k>0, Adnk[d,n-1,k]k + DivisorSum[d,Adnk[d,n-1,k-#] &], Boole[n==0 && k==0]]
    k=3; Table[DivisorSum[n,EulerPhi[#]Adnk[#,n/#,k]&]/(2n) - Ach[n,k]/2,{n,40}]

Formula

a(n) = (A056296(n) - A304973(n)) / 2 = A056296(n) - A056358(n) = A056358(n) - A304973(n).
a(n) = -Ach(n,k)/2 + (1/2n)*Sum_{d|n} phi(d)*A(d,n/d,k), where k=3 is number of colors or sets, Ach(n,k) = [n>=0 & n<2 & n==k] + [n>1]*(k*Ach(n-2,k)+Ach(n-2,k-1)+Ach(n-2,k-2)), and A(d,n,k) = [n==0 & k==0] + [n>0 & k>0]*(k*A(d,n-1,k) + Sum_{j|d} A(d,n-1,k-j)).

A305008 Triangle read by rows of coefficients for functions and generating functions for the number of achiral color patterns (set partitions) for a row or loop of varying length using exactly n colors (sets).

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 2, -1, -2, 1, 2, -1, -4, -2, 1, 3, -3, -11, 0, 6, 1, 3, -3, -17, -8, 20, 16, 1, 4, -6, -32, 1, 64, 20, -20, 1, 4, -6, -44, -19, 140, 136, -120, -132, 1, 5, -10, -70, 5, 301, 152, -396, -280, 28, 1, 5, -10, -90, -35, 541, 608, -1228, -1752, 800, 1216, 1, 6, -15, -130, 15, 966, 643, -2798
Offset: 0

Views

Author

Robert A. Russell, May 23 2018

Keywords

Comments

Triangle begins with T(0,0).
Two color patterns are equivalent if we permute the colors. Achiral color patterns must be equivalent if we reverse the order of the pattern.
The generating function for exactly n colors (column n of A304972) is
x^n * Sum_{k=0..n} (T(n, k) * x^k) / Product_{k=1..n} (1 - k*x^2).
Both the numerator and denominator of this g.f. have factors of (1+x) and (1-(n-2)*x^2) when n > 2.
Letting S2(m,n) be the Stirling subset number A008277(m,n), the function for exactly n colors for a row or loop of length m, A304972(m,n), n even, is
[m==0 mod 2] * Sum_{k=0..n/2} T(n, 2k) * S2((m+n)/2-k, n) +
[m==1 mod 2] * Sum_{k=1..n/2} T(n, 2k-1) * S2((m+n+1)/2-k, n).
When n is odd, the function for A304972(m,n) is
[m==0 mod 2] * Sum_{k=0..(n-1)/2} T(n, 2k+1) * S2((m+n-1)-k, n) +
[m==1 mod 2] * Sum_{k=0..(n-1)/2} T(n, 2k) * S2((m+n)/2-k, n).

Examples

			Triangle begins:
1;
1, 1;
1, 1,   0;
1, 2,  -1,   -2;
1, 2,  -1,   -4,  -2;
1, 3,  -3,  -11,   0,   6;
1, 3,  -3,  -17,  -8,  20,  16;
1, 4,  -6,  -32,   1,  64,  20,   -20;
1, 4,  -6,  -44, -19, 140, 136,  -120,  -132;
1, 5, -10,  -70,   5, 301, 152,  -396,  -280,   28;
1, 5, -10,  -90, -35, 541, 608, -1228, -1752,  800, 1216;
1, 6, -15, -130,  15, 966, 643, -2798, -3028, 2236, 3600, 936;
		

Crossrefs

Coefficients for functions and generating functions of A304973, A304974, A304975, A304976, which are columns 3-6 of A304972.

Programs

  • Mathematica
    Coef[n_, -1] := Coef[n, -1] = 0; Coef[n_, 0] := Coef[n, 0] = Boole[n>=0];
    Coef[n_, k_] := Coef[n, k] = If[k > n, 0, Coef[n-1, k-1] + Coef[n-2, k] - (n-1) Coef[n-2, k-2]]
    Table[Coef[n, k], {n, 0, 30}, {k, 0, n}] // Flatten

Formula

T(n,k) = [1 <= k <= n] * (T(n-1, k-1) + T(n-2, k) - (n-1) * T(n-2, k-2)) + [k==0 & n>=0].

A305751 Number of achiral color patterns (set partitions) in a row or cycle of length n with 5 or fewer colors (subsets).

Original entry on oeis.org

1, 1, 2, 3, 7, 12, 30, 55, 141, 266, 688, 1313, 3407, 6532, 16970, 32595, 84721, 162846, 423348, 813973, 2116227, 4069352, 10580110, 20345735, 52898501, 101726626, 264488408, 508629033, 1322433847, 2543136972, 6612152850, 12715668475
Offset: 0

Views

Author

Robert A. Russell, Jun 09 2018

Keywords

Comments

An equivalent color pattern is obtained when we permute the colors. Thus all permutations of ABCDE are equivalent, as are AABCDE and BBCDEA. A color pattern is achiral if it is equivalent to its reversal. Rotations of the colors of a cycle are equivalent, so for cycles AABBCDE = BBCDEAA = CDEAABB.

Examples

			For a(5) = 12, the achiral patterns for both rows and cycles are AAAAA, AABAA, ABABA, ABBBA, AABCC, ABACA, ABBBC, ABCAB, ABCBA, ABCBD, ABCDA, and ABCDE.
		

Crossrefs

Fifth column of A305749.
Cf. A056272 (oriented), A056324 (unoriented), A320935 (chiral), for rows.
Cf. A056293 (oriented), A056355 (unoriented), A320745 (chiral), for cycles.

Programs

  • Maple
    seq(coeff(series((1-2*x)*(1+2*x-2*x^2-3*x^3+x^4)/((1-x)*(1-2*x^2)*(1-5*x^2)),x,n+1), x, n), n = 0 .. 40); # Muniru A Asiru, Oct 30 2018
  • Mathematica
    Table[If[EvenQ[n], StirlingS2[(n+10)/2, 5] - 13 StirlingS2[(n+8)/2, 5] + 62 StirlingS2[(n+6)/2, 5] - 130 StirlingS2[(n+4)/2, 5] + 110 StirlingS2[(n+2)/2, 5] - 24 StirlingS2[n/2, 5], StirlingS2[(n+9)/2, 5] - 12 StirlingS2[(n+7)/2, 5] + 52 StirlingS2[(n+5)/2, 5] - 95 StirlingS2[(n+3)/2, 5] + 60 StirlingS2[(n+1)/2, 5]], {n, 0, 40}]
    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]]; (* A304972 *)
    k=5; Table[Sum[Ach[n, j], {j, 0, k}], {n, 0, 40}]
    CoefficientList[Series[(1-2x)(1+2x-2x^2-3x^3+x^4) / ((1- x)(1-2x^2)(1-5x^2)), {x,0,40}], x]
    Join[{1},LinearRecurrence[{1,7,-7,-10,10},{1,2,3,7,12},40]]
    Join[{1}, Table[If[EvenQ[n], (15 + 20 2^(n/2) + 13 5^(n/2)) / 60, (3 + 2 2^((n+1)/2) + 5^((n+1)/2)) / 12], {n,40}]]

Formula

a(n) = Sum_{j=0..5} Ach(n,j), where Ach(n,k) = [n>1] * (k*T(n-2,k) + T(n-2,k-1) + T(n-2,k-2)) + [0<=n<2 & n==k].
G.f.: (1 - 2x)*(1+2x-2x^2-3x^3+x^4) / ((1-x)*(1-2x^2)*(1-5x^2)).
a(2m) = S2(m+5,5) - 13*S2(m+4,5) + 62*S2(m+3,5) - 130*S2(m+2,5) + 110*S2(m+1,5) - 24*S2(m,5);
a(2m-1) = S2(m+4,5) - 12*S2(m+3,5) + 52*S2(m+2,5) - 95*S2(m+1,5) + 60*S2(m,5), where S2(n,k) is the Stirling subset number A008277.
For n>0, a(2m) = (15 + 20*2^m + 13*5^m) / 60.
a(2m-1) = (3 + 2*2^m + 5^m) / 12.
a(n) = 2*A056324(n) - A056272(n) = A056272(n) - 2*A320935(n) = A056324(n) - A320935(n).
a(n) = 2*A056355(n) - A056293(n) = A056293(n) - 2*A320745(n) = A056355(n) - A320745(n).
a(n) = A057427(n) + A052551(n-2) + A304973(n) + A304974(n) + A304975(n).
a(n) = a(n-1) + 7*a(n-2) - 7*a(n-3) - 10*a(n-4) + 10*a(n-5). - Muniru A Asiru, Oct 30 2018

A305752 Number of achiral color patterns (set partitions) in a row or cycle of length n with 6 or fewer colors (subsets).

Original entry on oeis.org

1, 1, 2, 3, 7, 12, 31, 58, 159, 312, 883, 1774, 5103, 10368, 30067, 61414, 178815, 366168, 1068259, 2190190, 6395919, 13120944, 38335123, 78665590, 229890591, 471814344, 1378985155, 2830350526, 8272839855, 16980500640, 49633834099, 101878204486
Offset: 0

Views

Author

Robert A. Russell, Jun 09 2018

Keywords

Comments

An equivalent color pattern is obtained when we permute the colors. Thus all permutations of ABCDE are equivalent, as are AABCDEF and BBCDEFA. A color pattern is achiral if it is equivalent to its reversal. Rotations of the colors of a cycle are equivalent, so for cycles AABCCDEF = BCCDEFAA = CCDEFAAB.

Examples

			For a(5) = 12, the achiral patterns for both rows and cycles are AAAAA, AABAA, ABABA, ABBBA, AABCC, ABACA, ABBBC, ABCAB, ABCBA, ABCBD, ABCDA, and ABCDE.
		

Crossrefs

Sixth column of A305749.
Cf. A056273 (oriented), A056325 (unoriented), A320936 (chiral), for rows.
Cf. A056294 (oriented), A056356 (unoriented), A320746 (chiral), for cycles.

Programs

  • Maple
    seq(coeff(series((1-10*x^2+x^3+29*x^4-6*x^5-25*x^6+8*x^7)/((1-x)*(1-2*x^2)*(1-3*x^2)*(1-6*x^2)),x,n+1), x, n), n = 0 .. 35); # Muniru A Asiru, Oct 30 2018
  • Mathematica
    Table[If[EvenQ[n], StirlingS2[(n+12)/2, 6] - 19 StirlingS2[(n+10)/2, 6] + 140 StirlingS2[(n+8)/2, 6] - 501 StirlingS2[(n+6)/2, 6] + 887 StirlingS2[(n+4)/2, 6] - 692 StirlingS2[(n+2)/2, 6] + 160 StirlingS2[n/2, 6], StirlingS2[(n+11)/2, 6] - 18 StirlingS2[(n+9)/2, 6] + 124 StirlingS2[(n+7)/2, 6] - 404 StirlingS2[(n+5)/2, 6] + 613 StirlingS2[(n+3)/2, 6] - 340 StirlingS2[(n+1)/2, 6]], {n, 0, 40}]
    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]]; (* A304972 *)
    k=6; Table[Sum[Ach[n, j], {j, 0, k}], {n, 0, 40}]
    CoefficientList[Series[(1-10x^2+x^3+29x^4-6x^5-25x^6+8x^7) / ((1-x)(1-2x^2)(1-3x^2)(1-6 x^2)), {x, 0, 40}], x]
    LinearRecurrence[{1,11,-11,-36,36,36,-36},{1,1,2,3,7,12,31,58},40]
    Join[{1}, Table[If[EvenQ[n], (36 + 45 2^(n/2) + 40 3^(n/2) + 19 6^(n/2)) / 180, (72 + 45 2^((n+1)/2) + 40 3^((n+1)/2) + 13 6^((n+1)/2)) / 360], {n,40}]]

Formula

a(n) = Sum_{j=0..6} Ach(n,j), where Ach(n,k) = [n>1] * (k*T(n-2,k) + T(n-2,k-1) + T(n-2,k-2)) + [0<=n<2 & n==k].
G.f.: (1-10x^2+x^3+29x^4-6x^5-25x^6+8x^7) / ((1-x)*(1-2x^2)*(1-3x^2)*(1-6x^2)).
a(2m) = S2(m+6,6) - 19*S2(m+5,6) + 140*S2(m+4,6) - 501*S2(m+3,6) + 887*S2(m+2,6) - 692*S2(m+1,6) + 160*S2(m,6);
a(2m-1) = S2(m+5,6) - 18*S2(m+4,6) + 124*S2(m+3,6) - 404*S2(m+2,6) + 613*S2(m+1,6) - 340*S2(m,6), where S2(n,k) is the Stirling subset number A008277.
For n>0, a(2m) = (36 + 45*2^m + 40*3^m + 19*6^m) / 180.
a(2m-1) = (72 + 45*2^m + 40*3^m + 13*6^m) / 360.
a(n) = 2*A056325(n) - A056273(n) = A056273(n) - 2*A320936(n) = A056325(n) - A320936(n).
a(n) = 2*A056356(n) - A056294(n) = A056294(n) - 2*A320746(n) = A056356(n) - A320936(n).
a(n) = A057427(n) + A052551(n-2) + A304973(n) + A304974(n) + A304975(n) + A304976(n).
a(n) = a(n-1) + 11*a(n-2) - 11*a(n-3) - 36*a(n-4) + 36*a(n-5) + 36*a(n-6) - 36*a(n-7). - Muniru A Asiru, Oct 30 2018
Showing 1-9 of 9 results.