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 10 results.

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

A320742 Array read by antidiagonals: T(n,k) is the number of chiral pairs of color patterns (set partitions) in a cycle of length n using k or fewer colors (subsets).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 6, 13, 2, 0, 0, 0, 0, 0, 0, 6, 30, 46, 7, 0, 0, 0, 0, 0, 0, 6, 34, 130, 144, 12, 0, 0, 0, 0, 0, 0, 6, 34, 181, 532, 420, 31, 0, 0, 0, 0, 0, 0, 6, 34, 190, 871, 2006, 1221, 58, 0, 0, 0, 0, 0, 0, 6, 34, 190, 996, 4016, 7626, 3474, 126, 0, 0, 0, 0, 0, 0, 6, 34, 190, 1011, 5070, 18526, 28401, 9856, 234, 0
Offset: 1

Views

Author

Robert A. Russell, Oct 21 2018

Keywords

Comments

Two color patterns are equivalent if the colors are permuted.
Adnk[d,n,k] in Mathematica program is coefficient of x^k in A(d,n)(x) in Gilbert and Riordan reference.

Examples

			Array begins with T(1,1):
0  0    0     0     0      0      0      0      0      0      0      0 ...
0  0    0     0     0      0      0      0      0      0      0      0 ...
0  0    0     0     0      0      0      0      0      0      0      0 ...
0  0    0     0     0      0      0      0      0      0      0      0 ...
0  0    0     0     0      0      0      0      0      0      0      0 ...
0  0    4     6     6      6      6      6      6      6      6      6 ...
0  1   13    30    34     34     34     34     34     34     34     34 ...
0  2   46   130   181    190    190    190    190    190    190    190 ...
0  7  144   532   871    996   1011   1011   1011   1011   1011   1011 ...
0 12  420  2006  4016   5070   5328   5352   5352   5352   5352   5352 ...
0 31 1221  7626 18526  26454  29215  29705  29740  29740  29740  29740 ...
0 58 3474 28401 85101 139484 165164 171556 172415 172466 172466 172466 ...
For T(6,4)=6, the chiral pairs are AAABBC-AAABCC, AABABC-AABCAC, AABACB-AABCAB, AABACC-AABBAC, AABACD-AABCAD and AABCBD-AABCDC.
		

Crossrefs

Partial row sums of A320647.
For increasing k, columns converge to A320749.
Cf. A320747 (oriented), A320748 (unoriented), A305749 (achiral).

Programs

  • Mathematica
    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]]
    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 *)
    Table[Sum[(DivisorSum[n, EulerPhi[#] Adnk[#,n/#,j]&]/n - Ach[n,j])/2, {j,k-n+1}], {k,15}, {n,k}] // Flatten
  • 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)={my(M=(R(n) - Ach(n))/2); for(i=2, n, M[,i] += M[,i-1]); M}
    { my(A=T(12)); for(n=1, #A, print(A[n, ])) } \\ Andrew Howroyd, Nov 03 2019

Formula

T(n,k) = Sum_{j=1..k} -Ach(n,j)/2 + (1/2n)*Sum_{d|n} phi(d)*A(d,n/d,j), where 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)).
T(n,k) = (A320747(n,k) - A305749(n,k)) / 2 = A320747(n,k) - A320748(n,k)= A320748(n,k) - A305749(n,k).

A320750 Array read by antidiagonals: T(n,k) is the number of color patterns (set partitions) in an unoriented row of length n using k or fewer colors (subsets).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 4, 6, 1, 1, 2, 4, 10, 10, 1, 1, 2, 4, 11, 25, 20, 1, 1, 2, 4, 11, 31, 70, 36, 1, 1, 2, 4, 11, 32, 107, 196, 72, 1, 1, 2, 4, 11, 32, 116, 379, 574, 136, 1, 1, 2, 4, 11, 32, 117, 455, 1451, 1681, 272, 1
Offset: 1

Views

Author

Robert A. Russell, Oct 27 2018

Keywords

Comments

Two color patterns are equivalent if the colors are permuted.
In an unoriented row, chiral pairs are counted as one.
T(n,k) = Pi_k(P_n) which is the number of non-equivalent partitions of the path on n vertices, with at most 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
From Allan Bickle, Apr 05 2022: (Start)
The columns count unlabeled k-paths with n+k+2 vertices. (A k-path with order n at least k+2 is a k-tree with exactly two k-leaves (vertices of degree k). It can be constructed from a clique with k+1 vertices by iteratively adding a new degree k vertex adjacent to an existing clique containing an existing k-leaf.)
Recurrences for the columns appear in the papers by Bickle, Eckhoff, and Markenzon et al. (End)

Examples

			Array begins with T(1,1):
  1   1     1     1      1      1      1      1      1      1      1 ...
  1   2     2     2      2      2      2      2      2      2      2 ...
  1   3     4     4      4      4      4      4      4      4      4 ...
  1   6    10    11     11     11     11     11     11     11     11 ...
  1  10    25    31     32     32     32     32     32     32     32 ...
  1  20    70   107    116    117    117    117    117    117    117 ...
  1  36   196   379    455    467    468    468    468    468    468 ...
  1  72   574  1451   1993   2135   2151   2152   2152   2152   2152 ...
  1 136  1681  5611   9134  10480  10722  10742  10743  10743  10743 ...
  1 272  5002 22187  43580  55091  58071  58461  58486  58487  58487 ...
  1 528 14884 87979 211659 301633 333774 339764 340359 340389 340390 ...
For T(4,3)=10, the patterns are AAAA, AABB, ABAB, ABBA, ABBC, ABCA, AAAB, AABA, AABC, ABAC, the last four being chiral with partners ABBB, ABAA, ABCC, and ABCB.
		

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 1-7 are A000012, A005418, A001998(n-1), A056323, A056324, A056325, A345207.
As k increases, columns converge to A103293(n+1).
Cf. transpose of A278984 (oriented), A320751 (chiral), A305749 (achiral).
Partial column sums of A284949.

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 *)
    Table[Sum[StirlingS2[n,j] + Ach[n,j], {j,k-n+1}]/2, {k,15}, {n,k}] // Flatten

Formula

T(n,k) = Sum_{j=1..k} (S2(n,j) + Ach(n,j))/2, where S2 is the Stirling subset number A008277 and 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)).
T(n,k) = (A278984(k,n) + A305749(n,k)) / 2 = A278984(k,n) - A320751(n,k) = A320751(n,k) + A305749(n,k).
T(n,k) = Sum_{j=1..k} A284949(n,j).

A320751 Array read by antidiagonals: T(n,k) is the number of chiral pairs of color patterns (set partitions) in a row of length n using k or fewer colors (subsets).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0, 0, 1, 4, 6, 0, 0, 0, 1, 4, 16, 12, 0, 0, 0, 1, 4, 20, 52, 28, 0, 0, 0, 1, 4, 20, 80, 169, 56, 0, 0, 0, 1, 4, 20, 86, 336, 520, 120, 0, 0, 0, 1, 4, 20, 86, 400, 1344, 1600, 240, 0, 0, 0, 1, 4, 20, 86, 409, 1852, 5440, 4840, 496, 0
Offset: 1

Views

Author

Robert A. Russell, Oct 27 2018

Keywords

Comments

Two color patterns are equivalent if the colors are permuted.
A chiral row is not equivalent to its reverse.
T(n,k)=Xi_k(P_n) which is the number of non-equivalent distinguishing partitions of the path on n vertices, with at most 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. A distinguishing partition is a partition of the vertex set of G such that no nontrivial automorphism of G can preserve it. - Bahman Ahmadi, Sep 02 2019

Examples

			Array begins with T(1,1):
0   0     0      0       0       0       0       0       0       0 ...
0   0     0      0       0       0       0       0       0       0 ...
0   1     1      1       1       1       1       1       1       1 ...
0   2     4      4       4       4       4       4       4       4 ...
0   6    16     20      20      20      20      20      20      20 ...
0  12    52     80      86      86      86      86      86      86 ...
0  28   169    336     400     409     409     409     409     409 ...
0  56   520   1344    1852    1976    1988    1988    1988    1988 ...
0 120  1600   5440    8868   10168   10388   10404   10404   10404 ...
0 240  4840  21760   42892   54208   57108   57468   57488   57488 ...
0 496 14641  87296  210346  299859  331705  337595  338155  338180 ...
0 992 44044 349184 1038034 1699012 2012202 2091458 2102518 2103348 ...
For T(4,2)=2, the chiral pairs are AAAB-ABBB and AABA-ABAA.
For T(4,3)=4, the above, AABC-ABCC, and ABAC-ABCB.
		

Crossrefs

Columns 1-6 are A000004, A122746(n-3), A107767(n-1), A320934, A320935, A320936.
As k increases, columns converge to A320937.
Cf. transpose of A278984 (oriented), A320750 (unoriented), A305749 (achiral).
Partial column sums of A320525.

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 *)
    Table[Sum[StirlingS2[n,j] - Ach[n,j], {j,k-n+1}]/2, {k,15}, {n,k}] // Flatten

Formula

T(n,k) = Sum_{j=1..k} (S2(n,j) - Ach(n,j)) / 2, where S2 is the Stirling subset number A008277 and 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)).
T(n,k) = (A278984(k,n) - A305749(n,k)) / 2 = A278984(k,n) - A320750(n,k) = A320750(n,k) - A305749(n,k).
T(n,k) = Sum_{j=1..k} A320525(n,j).

A320955 Square array read by ascending antidiagonals: A(n, k) (n >= 0, k >= 0) = Sum_{j=0..n-1} (!j/j!)*((n - j)^k/(n - j)!) if k > 0 and 1 if k = 0. Here !n denotes the subfactorial of n.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 2, 4, 1, 0, 1, 1, 2, 5, 8, 1, 0, 1, 1, 2, 5, 14, 16, 1, 0, 1, 1, 2, 5, 15, 41, 32, 1, 0, 1, 1, 2, 5, 15, 51, 122, 64, 1, 0, 1, 1, 2, 5, 15, 52, 187, 365, 128, 1, 0, 1, 1, 2, 5, 15, 52, 202, 715, 1094, 256, 1, 0
Offset: 0

Views

Author

Peter Luschny, Nov 05 2018

Keywords

Comments

Arndt and Sloane (see the link and A278984) identify the sequence to give "the number of words of length n over an alphabet of size b that are in standard order" and provide the formula Sum_{j = 1..b} Stirling_2(n, j) assuming b >= 1 and j >= 1. Compared to the array as defined here this misses the first row and the first column of our array.
The method used here is the special case of a general method described in A320956 applied to the function exp. For applications to other functions see the cross references.
A(k,n) is the number of color patterns (set partitions) for an oriented row of length n using up to k colors (subsets). Two color patterns are equivalent if the colors are permuted. For A(3,4) = 14, the six achiral patterns are AAAA, AABB, ABAB, ABBA, ABBC, and ABCA; the eight chiral patterns are the four chiral pairs AAAB-ABBB, AABA-ABAA, AABC-ABCC, and ABAC-ABCB. - Robert A. Russell, Nov 10 2018

Examples

			Array starts:
n\k   0  1  2  3   4   5    6    7     8      9  ...
----------------------------------------------------
[0]   1, 0, 0, 0,  0,  0,   0,   0,    0,     0, ...  A000007
[1]   1, 1, 1, 1,  1,  1,   1,   1,    1,     1, ...  A000012
[2]   1, 1, 2, 4,  8, 16,  32,  64,  128,   256, ...  A011782
[3]   1, 1, 2, 5, 14, 41, 122, 365, 1094,  3281, ...  A124302
[4]   1, 1, 2, 5, 15, 51, 187, 715, 2795, 11051, ...  A124303
[5]   1, 1, 2, 5, 15, 52, 202, 855, 3845, 18002, ...  A056272
[6]   1, 1, 2, 5, 15, 52, 203, 876, 4111, 20648, ...  A056273, ?A284727
[7]   1, 1, 2, 5, 15, 52, 203, 877, 4139, 21110, ...
[8]   1, 1, 2, 5, 15, 52, 203, 877, 4140, 21146, ...
[9]   1, 1, 2, 5, 15, 52, 203, 877, 4140, 21147, ...
----------------------------------------------------
Seen as a triangle given by the descending antidiagonals:
[0]             1
[1]            0, 1
[2]          0, 1, 1
[3]        0, 1, 1, 1
[4]       0, 1, 2, 1, 1
[5]     0, 1, 4, 2, 1, 1
[6]    0, 1, 8, 5, 2, 1, 1
[7]  0, 1, 16, 14, 5, 2, 1, 1
		

Crossrefs

Antidiagonal sums (and row sums of the triangle): A320964.
Cf. this sequence (exp), A320962 (log(x+1)), A320956 (sec+tan), A320958 (arcsin), A320959 (arctanh).
Cf. A320750 (unoriented), A320751 (chiral), A305749 (achiral).

Programs

  • Maple
    A := (n, k) -> if k = 0 then 1 else add(A008290(n, n-j)*(n-j)^k, j=0..n-1)/n! fi:
    seq(lprint(seq(A(n, k), k=0..9)), n=0..9); # Prints the array row-wise.
    seq(seq(A(n-k, k), k=0..n), n=0..11); # Gives the array as listed.
  • Mathematica
    T[n_, 0] := 1; T[n_, k_] := Sum[(Subfactorial[j]/Factorial[j])((n - j)^k/(n - j)!), {j, 0, n - 1}]; Table[T[n - k, k], {n, 0, 11}, {k, 0, n}] // Flatten
    Table[Sum[StirlingS2[k, j], {j, 0, n-k}], {n, 0, 11}, {k, 0, n}] // Flatten (* Robert A. Russell, Nov 10 2018 *)

Formula

A(n, k) = (1/n!)*Sum_{j=0..n-1} A008290(n, n-j)*(n-j)^k if k > 0.
If one drops the special case A(n, 0) = 1 from the definition then column 0 becomes Sum_{k=0..n} (-1)^k/k! = A103816(n)/A053556(n).
Row n is given for k >= 1 by a_n(k), where
a_0(k) = 0^k/0!.
a_1(k) = 1^k/1!.
a_2(k) = (2^k)/2!.
a_3(k) = (3^k + 3)/3!.
a_4(k) = (6*2^k + 4^k + 8)/4!.
a_5(k) = (20*2^k + 10*3^k + 5^k + 45)/5!.
a_6(k) = (135*2^k + 40*3^k + 15*4^k + 6^k + 264)/6!.
a_7(k) = (924*2^k + 315*3^k + 70*4^k + 21*5^k + 7^k + 1855)/7!.
a_8(k) = (7420*2^k + 2464*3^k + 630*4^k + 112*5^k + 28*6^k + 8^k + 14832)/8!.
Note that the coefficients of the generating functions a_n are the recontres numbers A000240, A000387, A000449, ...
Rewriting the formulas with exponential generating functions for the rows we have egf(n) = Sum_{k=0..n} !k*binomial(n,k)*exp(x*(n-k)) and A(n, k) = (k!/n!)*[x^k] egf(n). In this formulation no special rule for the case k = 0 is needed.
The rows converge to the Bell numbers. Convergence here means that for every fixed k the terms in column k differ from A000110(k) only for finitely many indices.
A(n, n) are the Bell numbers A000110(n) for n >= 0.
Let S(n, k) = Bell(n+k+1) - A(n, k+n+1) for n >= 0 and k >= 0, then the square array S(n, k) read by descending antidiagonals equals provable the triangle A137650 and equals empirical the transpose of the array A211561.

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

A320748 Array read by antidiagonals: T(n,k) is the number of color patterns (set partitions) in an unoriented cycle of length n using k or fewer colors (subsets).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 4, 1, 1, 2, 3, 6, 4, 1, 1, 2, 3, 7, 9, 8, 1, 1, 2, 3, 7, 11, 22, 9, 1, 1, 2, 3, 7, 12, 33, 40, 18, 1, 1, 2, 3, 7, 12, 36, 73, 100, 23, 1, 1, 2, 3, 7, 12, 37, 89, 237, 225, 44, 1, 1, 2, 3, 7, 12, 37, 92, 322, 703, 582, 63, 1, 1, 2, 3, 7, 12, 37, 93, 349, 1137, 2433, 1464, 122, 1, 1, 2, 3, 7, 12, 37, 93, 353, 1308, 4704, 8309, 3960, 190, 1, 1, 2, 3, 7, 12, 37, 93, 354, 1345, 5953, 19839, 30108, 10585, 362, 1
Offset: 1

Views

Author

Robert A. Russell, Oct 21 2018

Keywords

Comments

Two color patterns are equivalent if the colors are permuted. An unoriented cycle counts each chiral pair as one, i.e., they are equivalent.
Adnk[d,n,k] in Mathematica program is coefficient of x^k in A(d,n)(x) in Gilbert and Riordan reference.
T(n,k)=Pi_k(C_n) which is the number of non-equivalent partitions of the cycle on n vertices, with at most 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. - Bahman Ahmadi, Aug 21 2019
In other words, the number of n-bead bracelet structures using a maximum of k different colored beads. - Andrew Howroyd, Oct 30 2019

Examples

			Array begins with T(1,1):
1   1    1     1     1      1      1      1      1      1      1      1 ...
1   2    2     2     2      2      2      2      2      2      2      2 ...
1   2    3     3     3      3      3      3      3      3      3      3 ...
1   4    6     7     7      7      7      7      7      7      7      7 ...
1   4    9    11    12     12     12     12     12     12     12     12 ...
1   8   22    33    36     37     37     37     37     37     37     37 ...
1   9   40    73    89     92     93     93     93     93     93     93 ...
1  18  100   237   322    349    353    354    354    354    354    354 ...
1  23  225   703  1137   1308   1345   1349   1350   1350   1350   1350 ...
1  44  582  2433  4704   5953   6291   6345   6350   6351   6351   6351 ...
1  63 1464  8309 19839  28228  31284  31874  31944  31949  31950  31950 ...
1 122 3960 30108 88508 144587 171283 178190 179204 179300 179306 179307 ...
For T(7,2)=9, the patterns are AAAAAAB, AAAAABB, AAAABAB, AAAABBB, AAABAAB, AAABABB, AABAABB, AABABAB, and AAABABB; only the last is chiral, paired with AAABBAB.
		

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

Partial row sums of A152176.
For increasing k, columns converge to A084708.
Cf. A320747 (oriented), A320742 (chiral), A305749 (achiral).

Programs

  • Mathematica
    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]]
    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 *)
    Table[Sum[(DivisorSum[n, EulerPhi[#] Adnk[#,n/#,j]&]/n + Ach[n,j])/2, {j,k-n+1}], {k,15}, {n,k}] // Flatten
  • 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)={my(M=(R(n) + Ach(n))/2); for(i=2, n, M[,i] += M[,i-1]); M}
    { my(A=T(12)); for(n=1, #A, print(A[n, ])) } \\ Andrew Howroyd, Nov 03 2019

Formula

T(n,k) = Sum_{j=1..k} Ach(n,j)/2 + (1/2n)*Sum_{d|n} phi(d)*A(d,n/d,j), where 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)).
T(n,k) = (A320747(n,k) + A305749(n,k)) / 2 = A320747(n,k) - A320742(n,k) = A320742(n,k) + A305749(n,k).

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

A320747 Array read by antidiagonals: T(n,k) is the number of color patterns (set partitions) in an oriented cycle of length n using k or fewer colors (subsets).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 4, 1, 1, 2, 3, 6, 4, 1, 1, 2, 3, 7, 9, 8, 1, 1, 2, 3, 7, 11, 26, 10, 1, 1, 2, 3, 7, 12, 39, 53, 20, 1, 1, 2, 3, 7, 12, 42, 103, 146, 30, 1, 1, 2, 3, 7, 12, 43, 123, 367, 369, 56, 1, 1, 2, 3, 7, 12, 43, 126, 503, 1235, 1002, 94, 1, 1, 2, 3, 7, 12, 43, 127, 539, 2008, 4439, 2685, 180, 1, 1, 2, 3, 7, 12, 43, 127, 543, 2304, 8720, 15935, 7434, 316, 1, 1, 2, 3, 7, 12, 43, 127, 544, 2356, 11023, 38365, 58509, 20441, 596, 1
Offset: 1

Views

Author

Robert A. Russell, Oct 21 2018

Keywords

Comments

Two color patterns are equivalent if the colors are permuted. An oriented cycle counts each chiral pair as two.
Adnk[d,n,k] in Mathematica program is coefficient of x^k in A(d,n)(x) in Gilbert and Riordan reference.
In other words, the number of n-bead necklace structures using a maximum of k different colored beads. - Andrew Howroyd, Oct 30 2019

Examples

			Array begins with T(1,1):
1   1    1     1      1      1      1      1      1      1      1      1 ...
1   2    2     2      2      2      2      2      2      2      2      2 ...
1   2    3     3      3      3      3      3      3      3      3      3 ...
1   4    6     7      7      7      7      7      7      7      7      7 ...
1   4    9    11     12     12     12     12     12     12     12     12 ...
1   8   26    39     42     43     43     43     43     43     43     43 ...
1  10   53   103    123    126    127    127    127    127    127    127 ...
1  20  146   367    503    539    543    544    544    544    544    544 ...
1  30  369  1235   2008   2304   2356   2360   2361   2361   2361   2361 ...
1  56 1002  4439   8720  11023  11619  11697  11702  11703  11703  11703 ...
1  94 2685 15935  38365  54682  60499  61579  61684  61689  61690  61690 ...
1 180 7434 58509 173609 284071 336447 349746 351619 351766 351772 351773 ...
For T(4,2)=4, the patterns are AAAA, AAAB, AABB, and ABAB.
For T(4,3)=6, the patterns are the above four, AABC and ABAC.
		

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

Partial row sums of A152175.
For increasing k, columns converge to A084423.
Cf. A320748 (unoriented), A320742 (chiral), A305749 (achiral).

Programs

  • Mathematica
    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]]
    Table[Sum[DivisorSum[n, EulerPhi[#] Adnk[#,n/#,j] &], {j,k-n+1}]/n, {k,15}, {n,k}] // Flatten
  • PARI
    \\ R is A152175 as square matrix
    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)={my(M=R(n)); for(i=2, n, M[,i] += M[,i-1]); M}
    { my(A=T(12)); for(n=1, #A, print(A[n, ])) } \\ Andrew Howroyd, Nov 03 2019

Formula

T(n,k) = (1/n)*Sum_{j=1..k} Sum_{d|n} phi(d)*A(d,n/d,j), where 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)).
T(n,k) = A320748(n,k) + A320742(n,k) = 2*A320748(n,k) - A305749(n,k) = A305749(n,k) + 2*A320742(n,k).
Showing 1-10 of 10 results.