cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 12 results. Next

A274310 Triangle read by rows: T(n,k) = number of parity alternating partitions of [n] into k blocks (1 <= k <= m).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 4, 1, 1, 6, 11, 6, 1, 1, 10, 28, 26, 9, 1, 1, 14, 61, 86, 50, 12, 1, 1, 22, 136, 276, 236, 92, 16, 1, 1, 30, 275, 770, 927, 530, 150, 20, 1, 1, 46, 580, 2200, 3551, 2782, 1130, 240, 25, 1, 1, 62, 1141, 5710, 12160, 12632, 6987, 2130, 355, 30, 1
Offset: 1

Views

Author

N. J. A. Sloane, Jun 23 2016

Keywords

Comments

The first element of any block may be odd or even and then the parity of terms alternates within each block. - Alois P. Heinz, Jun 28 2016
Let a(n,k,i) be the number of parity alternating partitions of n into k blocks, i of which have even maximal elements. Dzhumadil'daev and Yeliussizov, Proposition 5.3, give recurrences for a(n,k,i), which depend on the parity of n. It is easy to verify that the solution to these recurrences is given by a(2*n,k,i) = Stirling2(n,i)*Stirling2(n+1,k+1-i) and a(2*n+1,k,i) = Stirling2(n+1,i+1) * Stirling2(n+1,k-i). The formula below for the table entries T(n,k) follows from this observation. - Peter Bala, Apr 09 2018

Examples

			Triangle begins:
  1;
  1,   1;
  1,   2,   1;
  1,   4,   4,   1;
  1,   6,  11,   6,   1;
  1,  10,  28,  26,   9,   1;
  1,  14,  61,  86,  50,  12,   1;
  1,  22, 136, 276, 236,  92,  16,   1;
  ...
From _Alois P. Heinz_, Jun 28 2016: (Start)
T(5,1) = 1: 12345.
T(5,2) = 6: 1234|5, 123|45, 125|34, 12|345, 145|23, 1|2345.
T(5,3) = 11: 123|4|5, 12|34|5, 125|3|4, 12|3|45, 14|23|5, 1|234|5, 1|23|45, 145|2|3, 14|25|3, 1|25|34, 1|2|345.
T(5,4) = 6: 12|3|4|5, 1|23|4|5, 14|2|3|5, 1|2|34|5, 1|25|3|4, 1|2|3|45.
T(5,5) = 1: 1|2|3|4|5. (End)
		

Crossrefs

Row sums give A124419(n+1).

Programs

  • Maple
    A274310 := proc (n, k) local i;
    with(combinat):
       add(Stirling2(floor((1/2)*n+1), i+1)*Stirling2(floor((1/2)*n+1/2), k-i), i = 0..k-1);
    end proc:
    for n from 1 to 10 do
       seq(A274310(n, k), k = 1..n);
    end do; # Peter Bala, Apr 09 2018
  • Mathematica
    T[n_, k_] = Sum[StirlingS2[Floor[(n + 2)/2], i + 1] * StirlingS2[Floor[(n + 1)/2], k - i], {i, 0, k - 1}];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, May 17 2018, after Peter Bala *)

Formula

T(n,k) = Sum_{i = 0..k-1} Stirling2(floor((n+2)/2), i+1) * Stirling2(floor((n+1)/2), k-i). - Peter Bala, Apr 09 2018

Extensions

More terms from Alois P. Heinz, Jun 26 2016

A274547 Number of set partitions of [n] with alternating parity of elements.

Original entry on oeis.org

1, 1, 2, 4, 8, 18, 40, 101, 254, 723, 2064, 6586, 21143, 74752, 266078, 1029983, 4013425, 16843526, 71136112, 321150717, 1458636308, 7038678613, 34161890155, 175261038904, 904125989974, 4909033438008, 26795600521492, 153376337926066, 882391616100249
Offset: 0

Views

Author

Alois P. Heinz, Jun 27 2016

Keywords

Examples

			a(5) = 18: 12345, 1234|5, 123|45, 123|4|5, 12|345, 12|34|5, 12|3|45, 12|3|4|5, 145|23, 1|2345, 1|234|5, 1|23|45, 1|23|4|5, 145|2|3, 1|2|345, 1|2|34|5, 1|2|3|45, 1|2|3|4|5.
a(6) = 40: 123456, 12345|6, 1234|56, 1234|5|6, 123|456, 123|45|6, 123|4|56, 123|4|5|6, 1256|34, 12|3456, 12|345|6, 12|34|56, 12|34|5|6, 1256|3|4, 12|3|456, 12|3|45|6, 12|3|4|56, 12|3|4|5|6, 145|236, 145|23|6, 1|23456, 1|2345|6, 1|234|56, 1|234|5|6, 1|23|456, 1|23|45|6, 1|23|4|56, 1|23|4|5|6, 145|2|36, 145|2|3|6, 1|256|34, 1|2|3456, 1|2|345|6, 1|2|34|56, 1|2|34|5|6, 1|256|3|4, 1|2|3|456, 1|2|3|45|6, 1|2|3|4|56, 1|2|3|4|5|6.
		

Crossrefs

Row sums of A274581.
Cf. A124419, A274310 (parities alternate within blocks), A363519.
Column k=2 of A274859.

Programs

  • Maple
    b:= proc(l, i, t) option remember; `if`(l=[], 1, add(`if`(l[j]=t,
           b(subsop(j=[][], l), j, 1-t), 0), j=[1, $i..nops(l)]))
        end:
    a:= n-> b([seq(irem(i, 2), i=2..n)], 1, 0):
    seq(a(n), n=0..25);
  • Mathematica
    b[l_, i_, t_] := b[l, i, t] = If[l == {}, 1, Sum[If[l[[j]] == t, b[ReplacePart[l, j -> Sequence[]], j, 1-t], 0], {j, Prepend[Range[i, Length[l]], 1]}]]; a[n_] := b[Table[Mod[i, 2], {i, 2, n}], 1, 0]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 15 2017, translated from Maple *)

Formula

a(n) = Sum_{k=0..n} A274581(n,k).
a(n) = A363519(n,max(0,n-1)). - Alois P. Heinz, Jun 07 2023

A305777 Number of set partitions of [n] with alternating parity of elements and exactly three blocks.

Original entry on oeis.org

1, 3, 7, 14, 30, 57, 119, 224, 460, 867, 1761, 3338, 6734, 12861, 25843, 49748, 99744, 193431, 387365, 756062, 1513138, 2969265, 5940567, 11708072, 23420228, 46317195, 92642569, 183707186, 367430742, 730111269, 1460255291, 2906227196, 5812519912, 11582124159
Offset: 3

Views

Author

Alois P. Heinz, Jun 10 2018

Keywords

Examples

			a(5) = 7: 123|4|5, 12|34|5, 12|3|45, 1|234|5, 145|2|3, 1|2|345, 1|23|45.
		

Crossrefs

Column k=3 of A274581.

Formula

G.f.: (10*x^6 -x^5 -13*x^4 +x^3 +6*x^2-1) *x^3 / ((2*x-1) *(x+1) *(3*x^2-1) *(2*x^2-1) *(x-1)^2).

A305778 Number of set partitions of [n] with alternating parity of elements and exactly four blocks.

Original entry on oeis.org

1, 4, 12, 33, 84, 222, 545, 1425, 3458, 8948, 21595, 55335, 133144, 338530, 813249, 2056245, 4935870, 12432432, 29833463, 74952867, 179842724, 451071998, 1082309293, 2711584785, 6506473162, 16289249356, 39088013091, 97811687679, 234720639024, 587166227226
Offset: 4

Views

Author

Alois P. Heinz, Jun 10 2018

Keywords

Examples

			a(5) = 4: 12|3|4|5, 1|23|4|5, 1|2|34|5, 1|2|3|45.
		

Crossrefs

Column k=4 of A274581.

Formula

G.f.: (72*x^11 -84*x^10 -258*x^9 +60*x^8 +287*x^7 +29*x^6 -141*x^5 -34*x^4 +33*x^3 +10*x^2 -3*x-1) *x^4 / ((2*x+1) *(2*x-1) *(x+1) *(6*x^2-1) *(3*x^2-1) *(x-1)^2 *(2*x^2-1)^2).

A305779 Number of set partitions of [n] with alternating parity of elements and exactly five blocks.

Original entry on oeis.org

1, 5, 19, 62, 204, 627, 2006, 6045, 19091, 56804, 177431, 523072, 1618006, 4739853, 14544372, 42440871, 129419597, 376877914, 1143885829, 3328765378, 10068808024, 29308488795, 88433869354, 257651383313, 776063514999, 2264100874960, 6811218232163, 19903182431380
Offset: 5

Views

Author

Alois P. Heinz, Jun 10 2018

Keywords

Crossrefs

Column k=5 of A274581.

A305780 Number of set partitions of [n] with alternating parity of elements and exactly six blocks.

Original entry on oeis.org

1, 6, 27, 108, 409, 1558, 5692, 21328, 76468, 282885, 999383, 3656887, 12772925, 46306978, 160408850, 577077226, 1987559778, 7105490315, 24379316121, 86719101209, 296819500851, 1051663900480, 3594472289644, 12696988924724, 43364647235536, 152825304753761
Offset: 6

Views

Author

Alois P. Heinz, Jun 10 2018

Keywords

Crossrefs

Column k=6 of A274581.

A305781 Number of set partitions of [n] with alternating parity of elements and exactly seven blocks.

Original entry on oeis.org

1, 7, 37, 169, 763, 3287, 14402, 60752, 261772, 1085823, 4614736, 18868613, 79286687, 320425251, 1333901662, 5341972670, 22066221462, 87764483463, 360206083844, 1425407602339, 5819322422329, 22944438320083, 93269292846714, 366809712490908, 1485913213777040
Offset: 7

Views

Author

Alois P. Heinz, Jun 10 2018

Keywords

Crossrefs

Column k=7 of A274581.

A305782 Number of set partitions of [n] with alternating parity of elements and exactly eight blocks.

Original entry on oeis.org

1, 8, 48, 254, 1284, 6456, 31559, 155828, 747046, 3633393, 17131855, 82235382, 382314833, 1814891650, 8339187411, 39220306016, 178502457056, 832998001071, 3762499165935, 17443657250690, 78322897989851, 361141330169264, 1614162421290491, 7409032399939348
Offset: 8

Views

Author

Alois P. Heinz, Jun 10 2018

Keywords

Crossrefs

Column k=8 of A274581.

A305783 Number of set partitions of [n] with alternating parity of elements and exactly nine blocks.

Original entry on oeis.org

1, 9, 61, 359, 2071, 11521, 64536, 351890, 1937292, 10385051, 56327364, 297361209, 1592259558, 8294350334, 43929021137, 226237017737, 1187116072881, 6055309005874, 31524381075907, 159529143743414, 825010507438945, 4148043681253075, 21331478060780614
Offset: 9

Views

Author

Alois P. Heinz, Jun 10 2018

Keywords

Crossrefs

Column k=9 of A274581.

A305784 Number of set partitions of [n] with alternating parity of elements and exactly ten blocks.

Original entry on oeis.org

1, 10, 75, 495, 3135, 19657, 120678, 743321, 4480240, 27176489, 161160411, 964119615, 5635200174, 33302382467, 192186538999, 1123752073702, 6413666231367, 37159362571856, 210072026510678, 1207564204033112, 6771732706003311, 38664907592673960, 215359228721631996
Offset: 10

Views

Author

Alois P. Heinz, Jun 10 2018

Keywords

Crossrefs

Column k=10 of A274581.
Showing 1-10 of 12 results. Next