A077042
Square array read by falling antidiagonals of central polynomial coefficients: largest coefficient in expansion of (1 + x + x^2 + ... + x^(n-1))^k = ((1-x^n)/(1-x))^k, i.e., the coefficient of x^floor(k*(n-1)/2) and of x^ceiling(k*(n-1)/2); also number of compositions of floor(k*(n+1)/2) into exactly k positive integers each no more than n.
Original entry on oeis.org
1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 3, 3, 1, 1, 0, 1, 6, 7, 4, 1, 1, 0, 1, 10, 19, 12, 5, 1, 1, 0, 1, 20, 51, 44, 19, 6, 1, 1, 0, 1, 35, 141, 155, 85, 27, 7, 1, 1, 0, 1, 70, 393, 580, 381, 146, 37, 8, 1, 1, 0, 1, 126, 1107, 2128, 1751, 780, 231, 48, 9, 1, 1, 0, 1, 252, 3139
Offset: 0
Rows of square array start:
1, 0, 0, 0, 0, 0, 0, ...
1, 1, 1, 1, 1, 1, 1, ...
1, 1, 2, 3, 6, 10, 20, ...
1, 1, 3, 7, 19, 51, 141, ...
1, 1, 4, 12, 44, 155, 580, ...
1, 1, 5, 19, 85, 381, 1751, ...
...
Read by antidiagonals:
1;
0, 1;
0, 1, 1;
0, 1, 1, 1;
0, 1, 2, 1, 1;
0, 1, 3, 3, 1, 1;
0, 1, 6, 7, 4, 1, 1;
...
- G. C. Greubel, Table of n, a(n) for the first 50 rows, flattened
- Denis Bouyssou, Thierry Marchant, Marc Pirlot, The size of the largest antichains in products of linear orders, arXiv:1903.07569 [math.CO], 2019.
- J. W. Sander, On maximal antihierarchic sets of integers, Discrete Mathematics, Volume 113, Issues 1-3, 5 April 1993, Pages 179-189.
- Index entries for sequences related to compositions
Rows include
A000007,
A000012,
A001405,
A002426,
A005190,
A005191,
A018901,
A025012,
A025013,
A025014,
A025015,
A201549,
A225779,
A201550. Columns include
A000012,
A000012,
A001477,
A077043,
A005900,
A077044,
A071816,
A133458.
-
t[n_, k_] := Max[ CoefficientList[ Series[ ((1-x^n) / (1-x))^k, {x, 0, k*(n-1)}], x]]; t[0, 0] = 1; t[0, ] = 0; Flatten[ Table[ t[n-k, k], {n, 0, 12}, {k, n, 0, -1}]] (* _Jean-François Alcover, Nov 04 2011 *)
-
T(n,k)=if(n<1 || k<1,k==0,vecmax(Vec(((1-x^n)/(1-x))^k)))
A274581
Number T(n,k) of set partitions of [n] with alternating parity of elements and exactly k blocks; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
Original entry on oeis.org
1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 3, 1, 0, 1, 5, 7, 4, 1, 0, 1, 7, 14, 12, 5, 1, 0, 1, 11, 30, 33, 19, 6, 1, 0, 1, 15, 57, 84, 62, 27, 7, 1, 0, 1, 23, 119, 222, 204, 108, 37, 8, 1, 0, 1, 31, 224, 545, 627, 409, 169, 48, 9, 1, 0, 1, 47, 460, 1425, 2006, 1558, 763, 254, 61, 10, 1
Offset: 0
T(5,1) = 1: 12345.
T(5,2) = 5: 1234|5, 123|45, 12|345, 145|23, 1|2345.
T(5,3) = 7: 123|4|5, 12|34|5, 12|3|45, 1|234|5, 145|2|3, 1|2|345, 1|23|45.
T(5,4) = 4: 12|3|4|5, 1|23|4|5, 1|2|34|5, 1|2|3|45.
T(5,5) = 1: 1|2|3|4|5.
Triangle T(n,k) begins:
1;
0, 1;
0, 1, 1;
0, 1, 2, 1;
0, 1, 3, 3, 1;
0, 1, 5, 7, 4, 1;
0, 1, 7, 14, 12, 5, 1;
0, 1, 11, 30, 33, 19, 6, 1;
0, 1, 15, 57, 84, 62, 27, 7, 1;
0, 1, 23, 119, 222, 204, 108, 37, 8, 1;
0, 1, 31, 224, 545, 627, 409, 169, 48, 9, 1;
...
Columns k=0-10 give:
A000007,
A057427,
A052955(n-2) for n>1,
A305777,
A305778,
A305779,
A305780,
A305781,
A305782,
A305783,
A305784.
-
b:= proc(l, i, t) option remember; `if`(l=[], x,
`if`(l[1]=t, 0, expand(x*b(subsop(1=[][], l), 1, 1-t)
))+add(`if`(l[j]=t, 0, b(subsop(j=[][], l), j, 1-t)
), j=i..nops(l)))
end:
T:= n-> `if`(n=0, 1, (p-> seq(coeff(p, x, j), j=0..n))(
b([seq(irem(i, 2), i=2..n)], 1$2))):
seq(T(n), n=0..12);
-
b[l_, i_, t_] := b[l, i, t] = If[l == {}, x, If[l[[1]] == t, 0, Expand[x*b[Rest[l], 1, 1 - t]]] + Sum[If[l[[j]] == t, 0, b[Delete[l, j], j, 1 - t]], {j, i, Length[l]}]];
T[n_] := If[n==0, {1}, Function[p, Table[Coefficient[p, x, j], {j, 0, n}]][ b[Table[Mod[i, 2], {i, 2, n}], 1, 1]]];
Flatten[Table[T[n], {n, 0, 12}]] (* Jean-François Alcover, May 27 2018, from Maple *)
A132894
Number of (1,0) steps in all paths of length n with steps U=(1,1), D=(1,-1) and H=(1,0), starting at (0,0), staying weakly above the x-axis (i.e., in all length-n left factors of Motzkin paths).
Original entry on oeis.org
0, 1, 4, 15, 52, 175, 576, 1869, 6000, 19107, 60460, 190333, 596652, 1863745, 5804176, 18028755, 55873872, 172818243, 533589660, 1644921789, 5063762220, 15568666029, 47811348816, 146675181975, 449538774048, 1376564658525
Offset: 0
a(2) = 4 because in the 5 (=A005773(3)) length-2 left factors of Motzkin paths, namely HH, HU, UD, UH and UU, we have altogether 4 H steps.
G.f. = x + 4*x^2 + 15*x^3 + 52*x^4 + 175*x^5 + 576*x^6 + 1869*x^7 + 6000*x^8 + ...
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- A. Asinowski and G. Rote, Point sets with many non-crossing matchings, arXiv preprint arXiv:1502.04925 [cs.CG], 2015.
- Luca Ferrari and Emanuele Munarini, Enumeration of edges in some lattices of paths, arXiv preprint arXiv:1203.6792, 2012; and also, J. Int. Seq. 17 (2014) #14.1.5.
- Mark Shattuck, Subword Patterns in Smooth Words, Enum. Comb. Appl. (2024) Vol. 4, No. 4, Art. No. S2R32. See p. 6.
-
a := n -> add(k*binomial(n, k)*binomial(n-k, floor((n-k)/2)), k=0..n): seq(a(n), n=0..25);
# second Maple program:
a:= proc(n) a(n):=`if`(n<2, n, 2*n/(n-1)*a(n-1)+3*a(n-2)) end:
seq(a(n), n=0..40); # Alois P. Heinz, Jul 15 2013
-
a[n_] := n*Hypergeometric2F1[3/2, 1-n, 2, 4]; Table[ a[n] // Abs, {n, 0, 25}] (* Jean-François Alcover, Jul 10 2013 *)
a[ n_] := If[ n < 0, 0, -(-1)^n n Hypergeometric2F1[ 3/2, 1 - n, 2, 4]]; (* Michael Somos, Aug 06 2014 *)
-
A132894 = lambda n: (-1)^(n+1)*jacobi_P(n-1,1,-n+1/2,-7)
[Integer(A132894(n).n(40),16) for n in range(26)] # Peter Luschny, Sep 23 2014
A235988
Sum of the partition parts of 3n into 3 parts.
Original entry on oeis.org
3, 18, 63, 144, 285, 486, 777, 1152, 1647, 2250, 3003, 3888, 4953, 6174, 7605, 9216, 11067, 13122, 15447, 18000, 20853, 23958, 27393, 31104, 35175, 39546, 44307, 49392, 54897, 60750, 67053, 73728, 80883, 88434, 96495, 104976, 113997, 123462, 133497, 144000
Offset: 1
a(2) = 18; 3(2) = 6 has 3 partitions into 3 parts: (4, 1, 1), (3, 2, 1), and (2, 2, 2). The sum of the parts is 18.
Figure 1: The partitions of 3n into 3 parts for n = 1, 2, 3, ...
13 + 1 + 1
12 + 2 + 1
11 + 3 + 1
10 + 4 + 1
9 + 5 + 1
8 + 6 + 1
7 + 7 + 1
10 + 1 + 1 11 + 2 + 2
9 + 2 + 1 10 + 3 + 2
8 + 3 + 1 9 + 4 + 2
7 + 4 + 1 8 + 5 + 2
6 + 5 + 1 7 + 6 + 2
7 + 1 + 1 8 + 2 + 2 9 + 3 + 3
6 + 2 + 1 7 + 3 + 2 8 + 4 + 3
5 + 3 + 1 6 + 4 + 2 7 + 5 + 3
4 + 4 + 1 5 + 5 + 2 6 + 6 + 3
4 + 1 + 1 5 + 2 + 2 6 + 3 + 3 7 + 4 + 4
3 + 2 + 1 4 + 3 + 2 5 + 4 + 3 6 + 5 + 4
1 + 1 + 1 2 + 2 + 2 3 + 3 + 3 4 + 4 + 4 5 + 5 + 5
3(1) 3(2) 3(3) 3(4) 3(5) .. 3n
------------------------------------------------------------------------
3 18 63 144 285 .. a(n)
- _Wesley Ivan Hurt_, Sep 07 2019
-
[3*n^3-3*n*Floor(n^2/4): n in [1..100]]; // Wesley Ivan Hurt, Nov 01 2015
-
[3*n*(1-(-1)^n+6*n^2)/8: n in [1..40]]; // Vincenzo Librandi, Nov 18 2015
-
A235988:=n->3*n^3 - 3*n*floor(n^2/4); seq(A235988(n), n=1..100);
-
Table[3 n^3 - 3 n*Floor[n^2/4], {n, 100}] (* or *) CoefficientList[ Series[3*x*(x^4 + 4*x^3 + 8*x^2 + 4*x + 1)/((x - 1)^4*(x + 1)^2), {x, 0, 30}], x]
LinearRecurrence[{2,1,-4,1,2,-1},{3,18,63,144,285,486},40] (* Harvey P. Dale, May 17 2018 *)
-
a(n)=3*n^3 - n^2\4*3*n \\ Charles R Greathouse IV, Oct 07 2015
-
x='x+O('x^50); Vec(3*x*(x^4+4*x^3+8*x^2+4*x+1)/((x-1)^4*(x+1)^2)) \\ Altug Alkan, Nov 01 2015
A008747
Expansion of (1+x^4)/((1-x)*(1-x^2)*(1-x^3)).
Original entry on oeis.org
1, 1, 2, 3, 5, 6, 9, 11, 14, 17, 21, 24, 29, 33, 38, 43, 49, 54, 61, 67, 74, 81, 89, 96, 105, 113, 122, 131, 141, 150, 161, 171, 182, 193, 205, 216, 229, 241, 254, 267, 281, 294, 309, 323, 338, 353, 369, 384, 401, 417, 434, 451, 469, 486, 505, 523, 542, 561
Offset: 0
G.f. = 1 + x + 2*x^2 + 3*x^3 + 5*x^4 + 6*x^5 + 9*x^6 + 11*x^7 + 14*x^8 + ...
- Seiichi Manyama, Table of n, a(n) for n = 0..10000
- Robert Morris, Minimal percolating sets in bootstrap percolation, arXiv:math/0702370 [math.CO], 2007-2008.
- Index entries for linear recurrences with constant coefficients, signature (1,1,0,-1,-1,1).
-
a:=[1,1,2,3,5,6];; for n in [7..60] do a[n]:=a[n-1]+a[n-2]-a[n-4] -a[n-5]+a[n-6]; od; a; # G. C. Greubel, Aug 03 2019
-
R:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1+x^4)/((1-x)*(1-x^2)*(1-x^3)) )); // G. C. Greubel, Aug 03 2019
-
A008747:=n->ceil((n+1)^2/6): seq(A008747(n), n=0..100); # Wesley Ivan Hurt, Oct 25 2016
-
CoefficientList[Series[(1+x^4)/((1-x)(1-x^2)(1-x^3)),{x,0,60}],x] (* or *) LinearRecurrence[{1,1,0,-1,-1,1},{1,1,2,3,5,6},60] (* Harvey P. Dale, Sep 05 2012 *)
-
Vec((1+x^4)/((1-x)*(1-x^2)*(1-x^3))+O(x^60)) \\ Charles R Greathouse IV, Sep 25 2012
-
((1+x^4)/((1-x)*(1-x^2)*(1-x^3))).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Aug 03 2019
A129819
Antidiagonal sums of triangular array T: T(j,k) = (k+1)/2 for odd k, T(j,k) = 0 for k = 0, T(j,k) = j+1-k/2 for even k > 0; 0 <= k <= j.
Original entry on oeis.org
0, 0, 1, 1, 3, 4, 7, 8, 12, 14, 19, 21, 27, 30, 37, 40, 48, 52, 61, 65, 75, 80, 91, 96, 108, 114, 127, 133, 147, 154, 169, 176, 192, 200, 217, 225, 243, 252, 271, 280, 300, 310, 331, 341, 363, 374, 397, 408, 432, 444, 469, 481, 507, 520, 547, 560, 588, 602, 631
Offset: 0
First seven rows of T are
0;
0, 1;
0, 1, 2;
0, 1, 3, 2;
0, 1, 4, 2, 3;
0, 1, 5, 2, 4, 3;
0, 1, 6, 2, 5, 3, 4;.
-
m:=59; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do for k:=2 to j do if k mod 2 eq 0 then M[j, k]:= k div 2; else M[j, k]:=j-(k div 2); end if; end for; end for; [ &+[ M[j-k+1, k]: k in [1..(j+1) div 2] ]: j in [1..m] ]; // Klaus Brockhaus, Jul 16 2007
-
A129819:= func< n | Floor(((n-1)*(3*n+1) +(2*n+5)*((n+1) mod 2))/16) >;
[A129819(n): n in [0..70]]; // G. C. Greubel, Sep 19 2024
-
CoefficientList[Series[x^2*(1+x^2+x^3)/((1-x)*(1-x^2)*(1-x^4)), {x, 0, 70}], x] (* G. C. Greubel, Sep 19 2024 *)
-
{vector(59, n, (n-2+n%2)*(n+n%2)/8+floor((n-2-n%2)^2/16))} \\ Klaus Brockhaus, Jul 16 2007
-
def A129819(n): return ((n-1)*(3*n+1) + (2*n+5)*((n+1)%2))//16
[A129819(n) for n in range(71)] # G. C. Greubel, Sep 19 2024
A109439
Triangle read by rows, in which row n gives coefficients in expansion of ((1 - x^n)/(1 - x))^3.
Original entry on oeis.org
1, 1, 3, 3, 1, 1, 3, 6, 7, 6, 3, 1, 1, 3, 6, 10, 12, 12, 10, 6, 3, 1, 1, 3, 6, 10, 15, 18, 19, 18, 15, 10, 6, 3, 1, 1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1, 1, 3, 6, 10, 15, 21, 28, 33, 36, 37, 36, 33, 28, 21, 15, 10, 6, 3, 1, 1, 3, 6, 10, 15, 21, 28, 36, 42, 46, 48, 48
Offset: 1
Triangle starts:
1;
1, 3, 3, 1;
1, 3, 6, 7, 6, 3, 1;
1, 3, 6,10,12,12,10, 6, 3, 1;
1, 3, 6,10,15,18,19,18,15,10, 6, 3, 1;
1, 3, 6,10,15,21,25,27,27,25,21,15,10, 6, 3, 1;
1, 3, 6,10,15,21,28,33,36,37,36,33,28,21,15,10, 6, 3, 1.
-
Flatten[Table[CoefficientList[Series[((1-x^n)/(1-x))^3,{x,1,3*n}],x], {n,1,100}],1]
-
row(n) = Vec(((1 - x^n)/(1 - x))^3);
tabf(nn) = for (n=1, nn, print(row(n))); \\ Michel Marcus, Oct 12 2016
A102214
Expansion of (1 + 4*x + 4*x^2)/((1+x)*(1-x)^3).
Original entry on oeis.org
1, 6, 16, 30, 49, 72, 100, 132, 169, 210, 256, 306, 361, 420, 484, 552, 625, 702, 784, 870, 961, 1056, 1156, 1260, 1369, 1482, 1600, 1722, 1849, 1980, 2116, 2256, 2401, 2550, 2704, 2862, 3025, 3192, 3364, 3540, 3721, 3906, 4096, 4290, 4489, 4692, 4900
Offset: 0
-
[(6*n*(3*n+4)+(-1)^n+7)/8: n in [0..60]]; // Vincenzo Librandi, Oct 26 2011
-
aa = {}; Do[i = 0; Do[Do[Do[If[x + y == z, i = i + 1], {x, y + 1, 3 n}], {y, 1, 3 n}], {z, 1, 3 n}]; AppendTo[aa, i], {n, 1, 20}]; aa (* Artur Jasinski, Feb 09 2010 *)
-
a(n)=(6*n*(3*n+4)+(-1)^n+7)/8 \\ Charles R Greathouse IV, Apr 16 2020
A220098
Manhattan distances between 2n and 1 in the double spiral with positive integers and 1 at the center.
Original entry on oeis.org
1, 2, 1, 2, 3, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 7, 6, 5, 4, 5, 6, 7, 8, 7, 6, 5, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9, 8, 7, 6, 7, 8, 9, 10, 11, 12, 13
Offset: 1
From _Philippe Deléham_, Mar 08 2013: (Start)
As a square array, this begins:
1, 1, 2, 2, 3, 3, 4, 4, 5, ...
2, 3, 3, 4, 4, 5, 5, 6, 6, ...
2, 4, 5, 5, 6, 6, 7, 7, 8, ...
3, 4, 6, 7, 7, 8, 8, 9, 9, ...
3, 5, 6, 8, 9, 9, 10, 10, 11, ...
4, 5, 7, 8, 10, 11, 11, 12, 12, ...
4, 6, 7, 9, 10, 12, 13, 13, 14, ...
5, 6, 8, 9, 11, 12, 14, 15, 15, ..., etc.
As a triangle, this begins:
1
2, 1
2, 3, 2
3, 4, 3, 2
3, 4, 5, 4, 3
4, 5, 6, 5, 4, 3, etc. (End)
-
#include
#define SIZE 20
int grid[SIZE][SIZE];
int direction[] = {0, -1, 1, 0, 0, 1, -1, 0};
main() {
int i, j, x1, y1, x2, y2, stepSize;
int direction1pos=0, direction2pos=4, val;
x1 = y1 = x2 = y2 = SIZE/2;
for (val=grid[y1][x1]=1, stepSize=0; ; ++stepSize) {
if (x1<1 || x1>=SIZE-1 || x2<1 || x2>=SIZE-1) break;
if (y1<1 || y1>=SIZE-1 || y2<1 || y2>=SIZE-1) break;
for (i=stepSize|1; i; ++val,--i) {
x1 += direction[direction1pos ];
y1 += direction[direction1pos+1];
x2 += direction[direction2pos ];
y2 += direction[direction2pos+1];
grid[y1][x1] = val*2;
grid[y2][x2] = val*2+1;
printf("%d, ",abs(x1-SIZE/2)+abs(y1-SIZE/2));
}
direction1pos = (direction1pos+2) & 7;
direction2pos = (direction2pos+2) & 7;
}
for (i=0; i
-
step(v, m) = concat(v, vector(m, k, 1+v[#v-k+1]))
a(max_n) = {my(v=[0], k=1); while(#v < max_n+1, v=step(v,k); k++); v[2..max_n+1]} \\ Thomas Scheuerle, Jan 07 2025
-
A053615(n) = if(n<1, 0, sqrtint(n) - A053615(n - sqrtint(n)))
a(n) = A053615(floor( floor( (sqrtint(n*8) + 1)/2 )^2/2 ) + n) \\ Thomas Scheuerle, Jan 07 2025
A256225
Number of partitions of 5n into 5 parts.
Original entry on oeis.org
0, 1, 7, 30, 84, 192, 377, 674, 1115, 1747, 2611, 3765, 5260, 7166, 9542, 12470, 16019, 20282, 25337, 31289, 38225, 46262, 55496, 66055, 78045, 91606, 106852, 123935, 142979, 164147, 187572, 213429, 241860, 273052, 307156, 344370, 384855, 428821, 476437, 527925
Offset: 0
For n=2, the 7 partitions of 10 are [6,1,1,1,1], [5,2,1,1,1], [4,3,1,1,1], [4,2,2,1,1], [3,3,2,1,1], [3,2,2,2,1] and [2,2,2,2,2].
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,0,-1,0,-2,2,0,1,0,-2,1).
-
Length /@ (Length /@ IntegerPartitions[5 #, {5}] & /@ Range@ 39) (* Michael De Vlieger, Mar 20 2015 *)
-
concat(0, Vec(-x* (x^8+5*x^7+16*x^6+25*x^5+31*x^4+25*x^3+16*x^2+5*x+1) / ((x-1)^5*(x+1)^2*(x^2+1)*(x^2+x+1)) + O(x^100)))
-
concat(0, vector(40, n, k=0; forpart(p=5*n, k++, , [5,5]); k)) \\ Colin Barker, Mar 21 2015
Comments