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

A056242 Triangle read by rows: T(n,k) = number of k-part order-consecutive partition of {1,2,...,n} (1 <= k <= n).

Original entry on oeis.org

1, 1, 2, 1, 5, 4, 1, 9, 16, 8, 1, 14, 41, 44, 16, 1, 20, 85, 146, 112, 32, 1, 27, 155, 377, 456, 272, 64, 1, 35, 259, 833, 1408, 1312, 640, 128, 1, 44, 406, 1652, 3649, 4712, 3568, 1472, 256, 1, 54, 606, 3024, 8361, 14002, 14608, 9312, 3328, 512, 1, 65, 870, 5202
Offset: 1

Views

Author

Colin Mallows, Aug 23 2000

Keywords

Comments

Generalized Riordan array (1/(1-x), x/(1-x) + x*dif(x/1-x),x)). - Paul Barry, Dec 26 2007
Reversal of A117317. - Philippe Deléham, Feb 11 2012
Essentially given by (1, 0, 1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 11 2012
This sequence is given in the Strehl presentation with the o.g.f. (1-z)/[1-2(1+t)z+(1+t)z^2], with offset 0, along with a recursion relation, a combinatorial interpretation, and relations to Hermite and Laguerre polynomials. Note that the o.g.f. is related to that of A049310. - Tom Copeland, Jan 08 2017
From Gus Wiseman, Mar 06 2020: (Start)
T(n,k) is also the number of unimodal length-n sequences covering an initial interval of positive integers with maximum part k, where a sequence of integers is unimodal if it is the concatenation of a weakly increasing and a weakly decreasing sequence. For example, the sequences counted by row n = 4 are:
(1111) (1112) (1123) (1234)
(1121) (1132) (1243)
(1122) (1223) (1342)
(1211) (1231) (1432)
(1221) (1232) (2341)
(1222) (1233) (2431)
(2111) (1321) (3421)
(2211) (1322) (4321)
(2221) (1332)
(2231)
(2311)
(2321)
(2331)
(3211)
(3221)
(3321)
(End)
T(n,k) is the number of hexagonal directed-column convex polyominoes of area n with k columns (see Baril et al. at page 9). - Stefano Spezia, Oct 14 2023

Examples

			Triangle begins:
  1;
  1,    2;
  1,    5,    4;
  1,    9,   16,    8;
  1,   14,   41,   44,   16;
  1,   20,   85,  146,  112,   32;
  1,   27,  155,  377,  456,  272,   64;
  1,   35,  259,  833, 1408, 1312,  640,  128;
  1,   44,  406, 1652, 3649, 4712, 3568, 1472,  256;
T(3,2)=5 because we have {1}{23}, {23}{1}, {12}{3}, {3}{12} and {2}{13}.
Triangle (1, 0, 1/2, 1/2, 0, 0, 0, ...) DELTA (0, 2, 0, 0, 0, ...) begins:
  1;
  1,   0;
  1,   2,   0;
  1,   5,   4,   0;
  1,   9,  16,   8,   0;
  1,  14,  41,  44,  16,   0;
  1,  20,  85, 146, 112,  32,   0;
  1,  27, 155, 377, 456, 272,  64,   0;
		

Crossrefs

Row sums are A007052.
Column k = n - 1 is A053220.
Ordered set-partitions are A000670.

Programs

  • Haskell
    a056242 n k = a056242_tabl !! (n-1)!! (k-1)
    a056242_row n = a056242_tabl !! (n-1)
    a056242_tabl = [1] : [1,2] : f [1] [1,2] where
       f us vs = ws : f vs ws where
         ws = zipWith (-) (map (* 2) $ zipWith (+) ([0] ++ vs) (vs ++ [0]))
                          (zipWith (+) ([0] ++ us ++ [0]) (us ++ [0,0]))
    -- Reinhard Zumkeller, May 08 2014
  • Maple
    T:=proc(n,k) if k=1 then 1 elif k<=n then sum((-1)^(k-1-j)*binomial(k-1,j)*binomial(n+2*j-1,2*j),j=0..k-1) else 0 fi end: seq(seq(T(n,k),k=1..n),n=1..12);
  • Mathematica
    rows = 11; t[n_, k_] := (-1)^(k+1)*HypergeometricPFQ[{1-k, (n+1)/2, n/2}, {1/2, 1}, 1]; Flatten[ Table[ t[n, k], {n, 1, rows}, {k, 1, n}]](* Jean-François Alcover, Nov 17 2011 *)

Formula

The Hwang and Mallows reference gives explicit formulas.
T(n,k) = Sum_{j=0..k-1} (-1)^(k-1-j)*binomial(k-1, j)*binomial(n+2j-1, 2j) (1<=k<=n); this is formula (11) in the Huang and Mallows reference.
T(n,k) = 2*T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k) - T(n-2,k-1), T(1,1) = 1, T(2,1) = 1, T(2,2) = 2. - Philippe Deléham, Feb 11 2012
G.f.: -(-1+x)*x*y/(1-2*x-2*x*y+x^2*y+x^2). - R. J. Mathar, Aug 11 2015

A332872 Number of ordered set partitions of {1..n} where no element of any block is greater than any element of a non-adjacent consecutive block.

Original entry on oeis.org

1, 1, 3, 10, 34, 116, 396, 1352, 4616, 15760
Offset: 0

Views

Author

Gus Wiseman, Mar 06 2020

Keywords

Comments

After initial terms, first differs from A291292 at a(7) = 1352, A291292(8) = 1353.
Conjectured to be the same as A007052, shifted right once.

Examples

			The a(1) = 1 through a(3) = 10 ordered set partitions:
  {{1}}  {{1,2}}    {{1,2,3}}
         {{1},{2}}  {{1},{2,3}}
         {{2},{1}}  {{1,2},{3}}
                    {{1,3},{2}}
                    {{2},{1,3}}
                    {{2,3},{1}}
                    {{3},{1,2}}
                    {{1},{2},{3}}
                    {{1},{3},{2}}
                    {{2},{1},{3}}
		

Crossrefs

Row sums of A332673.
Set partitions are A000110.
Ordered set-partitions are A000670.
Unimodal sequences covering an initial interval are A007052.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[Join@@Permutations/@sps[Range[n]],!MatchQ[#,{_,{_,a_,_},,{_,b_,_},_}/;a>b]&]],{n,0,5}]

A333150 Number of strict compositions of n whose non-adjacent parts are strictly decreasing.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 8, 10, 13, 18, 26, 31, 42, 52, 68, 89, 110, 136, 173, 212, 262, 330, 398, 487, 592, 720, 864, 1050, 1262, 1508, 1804, 2152, 2550, 3037, 3584, 4236, 5011, 5880, 6901, 8095, 9472, 11048, 12899, 14996, 17436, 20261, 23460, 27128, 31385, 36189
Offset: 0

Views

Author

Gus Wiseman, May 16 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. It is strict if there are no repeated parts.

Examples

			The a(1) = 1 through a(8) = 13 compositions:
  (1)  (2)  (3)    (4)    (5)    (6)      (7)      (8)
            (1,2)  (1,3)  (1,4)  (1,5)    (1,6)    (1,7)
            (2,1)  (3,1)  (2,3)  (2,4)    (2,5)    (2,6)
                          (3,2)  (4,2)    (3,4)    (3,5)
                          (4,1)  (5,1)    (4,3)    (5,3)
                                 (2,3,1)  (5,2)    (6,2)
                                 (3,1,2)  (6,1)    (7,1)
                                 (3,2,1)  (2,4,1)  (2,5,1)
                                          (4,1,2)  (3,4,1)
                                          (4,2,1)  (4,1,3)
                                                   (4,3,1)
                                                   (5,1,2)
                                                   (5,2,1)
For example, (3,5,1,2) is such a composition, because the non-adjacent pairs of parts are (3,1), (3,2), (5,2), all of which are strictly decreasing.
		

Crossrefs

The case of permutations appears to be A000045(n + 1).
Unimodal strict compositions are A072706.
A version for ordered set partitions is A332872.
The non-strict version is A333148.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@#&&!MatchQ[#,{_,x_,,y_,_}/;y>x]&]],{n,0,10}]
  • PARI
    seq(n)={my(p=prod(k=1, n, 1 + y*x^k + O(x*x^n))); Vec(sum(k=0, n, fibonacci(k+1) * polcoef(p,k,y)))} \\ Andrew Howroyd, Apr 16 2021

Formula

G.f.: Sum_{k>=0} Fibonacci(k+1) * [y^k](Product_{j>=1} 1 + y*x^j). - Andrew Howroyd, Apr 16 2021

A332673 Triangle read by rows where T(n,k) is the number of length-k ordered set partitions of {1..n} whose non-adjacent blocks are pairwise increasing.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 6, 3, 0, 1, 14, 14, 5, 0, 1, 30, 45, 32, 8, 0, 1, 62, 124, 131, 65, 13, 0, 1, 126, 315, 438, 323, 128, 21, 0, 1, 254, 762, 1305, 1270, 747, 243, 34, 0, 1, 510, 1785, 3612, 4346, 3370, 1629, 452, 55
Offset: 0

Views

Author

Gus Wiseman, Mar 02 2020

Keywords

Comments

In other words, parts of subsequent, non-successive blocks are increasing.

Examples

			Triangle begins:
    1
    0    1
    0    1    2
    0    1    6    3
    0    1   14   14    5
    0    1   30   45   32    8
    0    1   62  124  131   65   13
    0    1  126  315  438  323  128   21
    0    1  254  762 1305 1270  747  243   34
    ...
Row n = 4 counts the following ordered set partitions:
  {1234}  {1}{234}  {1}{2}{34}  {1}{2}{3}{4}
          {12}{34}  {1}{23}{4}  {1}{2}{4}{3}
          {123}{4}  {12}{3}{4}  {1}{3}{2}{4}
          {124}{3}  {1}{24}{3}  {2}{1}{3}{4}
          {13}{24}  {12}{4}{3}  {2}{1}{4}{3}
          {134}{2}  {1}{3}{24}
          {14}{23}  {13}{2}{4}
          {2}{134}  {1}{34}{2}
          {23}{14}  {1}{4}{23}
          {234}{1}  {2}{1}{34}
          {24}{13}  {2}{13}{4}
          {3}{124}  {2}{14}{3}
          {34}{12}  {23}{1}{4}
          {4}{123}  {3}{12}{4}
		

Crossrefs

An apparently related triangle is A056242.
Column k = n - 1 is A332724.
Row sums are A332872, which appears to be A007052 shifted right once.
Ordered set-partitions are A000670.
Unimodal compositions are A001523.
Non-unimodal normal sequences are A328509.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[Join@@Permutations/@sps[Range[n]],Length[#]==k&&!MatchQ[#,{_,{_,a_,_},,{_,b_,_},_}/;a>b]&]],{n,0,5},{k,0,n}]

A333148 Number of compositions of n whose non-adjacent parts are weakly decreasing.

Original entry on oeis.org

1, 1, 2, 4, 7, 12, 19, 30, 46, 69, 102, 149, 214, 304, 428, 596, 823, 1127, 1532, 2068, 2774, 3697, 4900, 6460, 8474, 11061, 14375, 18600, 23970, 30770, 39354, 50153, 63702, 80646, 101783, 128076, 160701, 201076, 250933, 312346, 387832, 480409, 593716, 732105, 900810, 1106063, 1355336, 1657517, 2023207, 2464987, 2997834, 3639464
Offset: 0

Views

Author

Gus Wiseman, May 16 2020

Keywords

Examples

			The a(1) = 1 through a(6) = 19 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)
       (11)  (12)   (13)    (14)     (15)
             (21)   (22)    (23)     (24)
             (111)  (31)    (32)     (33)
                    (121)   (41)     (42)
                    (211)   (131)    (51)
                    (1111)  (212)    (141)
                            (221)    (222)
                            (311)    (231)
                            (1211)   (312)
                            (2111)   (321)
                            (11111)  (411)
                                     (1311)
                                     (2121)
                                     (2211)
                                     (3111)
                                     (12111)
                                     (21111)
                                     (111111)
For example, (2,3,1,2) is such a composition, because the non-adjacent pairs of parts are (2,1), (2,2), (3,2), all of which are weakly decreasing.
		

Crossrefs

Unimodal compositions are A001523.
The case of normal sequences appears to be A028859.
A version for ordered set partitions is A332872.
The case of strict compositions is A333150.
The version for strictly decreasing parts is A333193.
Standard composition numbers (A066099) of these compositions are A334966.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,{_,x_,,y_,_}/;y>x]&]],{n,0,15}]
  • Sage
    def a333148(n): return number_of_partitions(n) + sum( Partitions(m, max_part=l, length=k).cardinality() * Partitions(n-m-l^2, min_length=k+2*l).cardinality() for l in range(1, (n+1).isqrt()) for m in range((n-l^2-2*l)*l//(l+1)+1) for k in range(ceil(m/l), min(m,n-m-l^2-2*l)+1) ) # Max Alekseyev, Oct 31 2024

Formula

See Sage code for the formula. - Max Alekseyev, Oct 31 2024

Extensions

Edited and terms a(21)-a(51) added by Max Alekseyev, Oct 30 2024
Showing 1-5 of 5 results.