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

A067059 Square array read by antidiagonals of partitions which half fill an n*k box, i.e., partitions of floor(nk/2) or ceiling(nk/2) into up to n positive integers, each no more than k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 3, 3, 1, 1, 1, 1, 3, 5, 5, 3, 1, 1, 1, 1, 4, 6, 8, 6, 4, 1, 1, 1, 1, 4, 8, 12, 12, 8, 4, 1, 1, 1, 1, 5, 10, 18, 20, 18, 10, 5, 1, 1, 1, 1, 5, 13, 24, 32, 32, 24, 13, 5, 1, 1, 1, 1, 6, 15, 33, 49, 58, 49, 33, 15, 6, 1, 1, 1, 1, 6
Offset: 0

Views

Author

Henry Bottomley, Feb 17 2002

Keywords

Comments

The number of partitions of m into up to n positive integers each no more than k is maximized for given n and k by m=floor(nk/2) or ceiling(nk/2) (and possibly some other values).

Examples

			Rows start:
1, 1, 1, 1, 1, 1, ...;
1, 1, 1, 1, 1, 1, ...;
1, 1, 2, 2, 3, 3, ...;
1, 1, 2, 3, 5, 6, ...;
1, 1, 3, 5, 8, 12, ...; etc.
T(4,5)=12 since 10 can be partitioned into
5+5, 5+4+1, 5+3+2, 5+3+1+1, 5+2+2+1, 4+4+2, 4+3+3,
4+4+1+1, 4+3+2+1, 4+2+2+2, 3+3+3+1, and 3+3+2+2.
		

Crossrefs

As this is symmetric, rows and columns each include A000012 twice, A008619, A001971, A001973, A001975, A001977, A001979 and A001981. Diagonal is A029895. T(n, n*(n-1)) is the magic series A052456.

Programs

  • Maple
    A067059 := proc(n,k)
        local m,a1,a2 ;
        a1 := 0 ;
        m := floor(n*k/2) ;
        for L in combinat[partition](m) do
            if nops(L) <= n then
                if max(op(L)) <= k then
                    a1 := a1+1 ;
                end if ;
            end if;
        end do:
        a2 := 0 ;
        m := ceil(n*k/2) ;
        for L in combinat[partition](m) do
            if nops(L) <= n then
                if max(op(L)) <= k then
                    a2 := a2+1 ;
                end if ;
            end if;
        end do:
        max(a1,a2) ;
    end proc:
    for d from 0 to 12 do
        for k from 0 to d do
            printf("%d,",A067059(d-k,k)) ;
        end do:
    end do: # R. J. Mathar, Nov 13 2016
  • Mathematica
    t[n_, k_] := Length[ IntegerPartitions[ Floor[n*k/2], n, Range[k]]]; Flatten[ Table[ t[n-k , k], {n, 0, 13}, {k, 0, n}]] (* Jean-François Alcover, Jan 02 2012 *)
  • Sage
    def A067059(n, k):
        return Partitions((n*k)//2, max_length=n, max_part=k).cardinality()
    for n in (0..9): [A067059(n,k) for k in (0..9)] # Peter Luschny, May 05 2014

A201496 T(n,k)=Number of nXk zero-sum -2..2 arrays with rows and columns lexicographically nondecreasing.

Original entry on oeis.org

1, 3, 3, 5, 29, 5, 8, 226, 226, 8, 12, 1454, 9331, 1454, 12, 18, 7815, 301432, 301432, 7815, 18, 24, 36487, 7798656, 50432052, 7798656, 36487, 24, 33, 151593, 168357815, 6697376240, 6697376240, 168357815, 151593, 33, 43, 571539, 3127432827
Offset: 1

Views

Author

R. H. Hardin Dec 02 2011

Keywords

Comments

Table starts
..1.......3............5................8..................12
..3......29..........226.............1454................7815
..5.....226.........9331...........301432.............7798656
..8....1454.......301432.........50432052..........6697376240
.12....7815......7798656.......6697376240.......4585552158911
.18...36487....168357815.....732383803600....2571822263246639
.24..151593...3127432827...68110029402413.1219998885223727883
.33..571539..51118964623.5516712973977104
.43.1982705.747555368709
.55.6399842

Examples

			Some solutions for n=3 k=3
.-2..1..2...-1..1..1...-2.-1..0...-2.-1..0...-2.-2.-1...-2.-2..1....0..0..1
..0..0..1....1.-2.-1....0.-1..2...-1..2.-1...-2..2..2...-1..0..0....0..1.-1
..2.-2.-2....2..1.-2....2..2.-2....1..1..1....0..1..2....1..1..2....2.-1.-2
		

Crossrefs

Column 1 is A001973

A183917 T(n,k) = number of nondecreasing arrangements of n numbers in -k..k with sum zero.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 1, 4, 5, 3, 1, 5, 8, 8, 3, 1, 6, 13, 18, 12, 4, 1, 7, 18, 33, 32, 18, 4, 1, 8, 25, 55, 73, 58, 24, 5, 1, 9, 32, 86, 141, 151, 94, 33, 5, 1, 10, 41, 126, 252, 338, 289, 151, 43, 6, 1, 11, 50, 177, 414, 676, 734, 526, 227, 55, 6, 1, 12, 61, 241, 649, 1242, 1656, 1514
Offset: 1

Views

Author

R. H. Hardin, Jan 07 2011

Keywords

Examples

			Table starts
 1  1   1    1    1     1     1      1      1      1       1       1       1
 2  3   4    5    6     7     8      9     10     11      12      13      14
 2  5   8   13   18    25    32     41     50     61      72      85      98
 3  8  18   33   55    86   126    177    241    318     410     519     645
 3 12  32   73  141   252   414    649    967   1394    1944    2649    3523
 4 18  58  151  338   676  1242   2137   3486   5444    8196   11963   17002
 4 24  94  289  734  1656  3370   6375  11322  19138   30982   48417   73316
 5 33 151  526 1514  3788  8512  17575  33885  61731  107233  178870  288100
 5 43 227  910 2934  8150 20094  45207  94257 184717  343363  610358 1043534
 6 55 338 1514 5448 16660 44916 109583 246448 517971 1028172 1943488 3521260
Some solutions for n=5:
  -2  -4  -4  -4  -4  -1  -4  -3  -4  -3  -1  -4  -3  -3  -2  -4
  -2   0   0  -1  -2   0  -2  -2  -1  -3  -1  -4   0  -2   0  -3
   0   0   0   0  -1   0   1  -1   1   0   0   1   0   1   0  -1
   0   1   2   2   3   0   2   3   2   3   0   3   0   1   1   4
   4   3   2   3   4   1   3   3   2   3   2   4   3   3   1   4
		

Crossrefs

Column 2 is A001973.
Column 3 is A001977.
Column 4 is A001981.
Diagonal is A109655.
Row 3 is A000982(n+1).

Programs

  • Python
    from sympy.utilities.iterables import partitions
    def A183917_T(n,k): return sum(1 for p in partitions(k*n,m=n,k=k<<1)) # Chai Wah Wu, Aug 27 2024

A201503 T(n,k)=Number of nXk 0..1 arrays with every row and column running average nondecreasing rightwards and downwards, and the number of instances of each value within one of each other.

Original entry on oeis.org

2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 3, 6, 3, 2, 1, 3, 5, 5, 3, 1, 2, 4, 12, 8, 12, 4, 2, 1, 4, 8, 12, 12, 8, 4, 1, 2, 5, 20, 18, 40, 18, 20, 5, 2, 1, 5, 13, 24, 32, 32, 24, 13, 5, 1, 2, 6, 30, 33, 98, 58, 98, 33, 30, 6, 2, 1, 6, 18, 43, 73, 94, 94, 73, 43, 18, 6, 1, 2, 7, 42, 55, 204, 151, 338, 151, 204
Offset: 1

Views

Author

R. H. Hardin Dec 02 2011

Keywords

Comments

Table starts
.2.1..2..1...2...1...2....1....2....1....2.....1.....2.....1.....2......1
.1.2..2..3...3...4...4....5....5....6....6.....7.....7.....8.....8......9
.2.2..6..5..12...8..20...13...30...18...42....25....56....32....72.....41
.1.3..5..8..12..18..24...33...43...55...69....86...104...126...150....177
.2.3.12.12..40..32..98...73..204..141..380...252...650...414..1042....649
.1.4..8.18..32..58..94..151..227..338..480...676...920..1242..1636...2137
.2.4.20.24..98..94.338..289..936..734.2234..1656..4770..3370..9344...6375
.1.5.13.33..73.151.289..526..910.1514.2430..3788..5744..8512.12346..17575
.2.5.30.43.204.227.936..910.3334.2934.9936..8150.25908.20094.60882..45207
.1.6.18.55.141.338.734.1514.2934.5448.9686.16660.27718.44916.70922.109583

Examples

			Some solutions for n=5 k=4
..0..0..0..1....0..0..0..1....0..0..1..1....0..0..0..0....0..0..0..0
..0..0..0..1....0..0..0..1....0..0..1..1....0..0..0..0....0..0..1..1
..0..0..1..1....0..0..0..1....0..0..1..1....0..0..1..1....0..0..1..1
..0..1..1..1....0..1..1..1....0..0..1..1....1..1..1..1....0..0..1..1
..0..1..1..1....1..1..1..1....0..0..1..1....1..1..1..1....1..1..1..1
		

Crossrefs

Column 2 is A004526(n+2)
Column 3 odd terms are A002378((n+1)/2)
Column 3 even terms are A000982((n+2)/2)
Column 4 is A001973
Column 5 even terms are A188183((n-2)/2)
Column 6 is A001977
Column 7 even terms are A188185((n-4)/2)
Column 8 is A001981
Column 10 is A183913
Column 12 is A183914
Column 14 is A183915
Column 16 is A183916

A224838 Triangle read by rows, obtained from triangle A011973 by reading that array from right to left along the irregular paths shown in the figure.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 1, 1, 3, 4, 1, 4, 6, 5, 1, 1, 10, 10, 6, 1, 1, 5, 20, 15, 7, 1, 6, 15, 35, 21, 8, 1, 1, 21, 35, 56, 28, 9, 1, 1, 7, 56, 70, 84, 36, 10, 1, 8, 28, 126, 126, 120, 45, 11, 1, 1, 36, 84, 252, 210, 165, 55, 12, 1, 1, 9, 120, 210, 462, 330, 220, 66, 13, 1
Offset: 1

Views

Author

John Molokach, Jul 21 2013

Keywords

Comments

The successive rows have lengths 1,2,2; 3,4,4; 5,6,6; 7,8,8; ...
Sum of row n is A005314(n).
Old definition was: "Triangle of falling diagonals of A011973 (with rows displayed as centered text)."

Examples

			First 11 rows of the triangle:
  1;
  1,  1;
  2,  1;
  1,  3,  1;
  1,  3,  4,  1;
  4,  6,  5,  1;
  1, 10, 10,  6,  1;
  1,  5, 20, 15,  7,  1;
  6, 15, 35, 21,  8,  1;
  1, 21, 35, 56, 28,  9,  1;
  1,  7, 56, 70, 84, 36, 10,  1;
		

Crossrefs

Programs

  • Mathematica
    Table[Reverse[Table[Binomial[n - Floor[(k + 1)/2], n - Floor[(3 k - 1)/2]], {k, Floor[(2 n + 2)/3]}]], {n, 13}] (* T. D. Noe, Jul 25 2013 *)
    Column[Table[Binomial[n - Floor[(4 n + 15 - 6 k + (-1)^k)/12], n - Floor[(4 n + 15 - 6 k + (-1)^k)/12] - Floor[(2 n - 1)/3] + k - 1], {n, 1, 25}, {k, 1, Floor[(2 n + 2)/3]}]] (* John Molokach, Jul 25 2013 *)

Formula

r(n) = binomial(n-floor((4n+15-6k+(-1)^k)/12), n-floor((4n+15-6k+(-1)^k)/12)-floor((2n-1)/3)+k-1), k = 1..floor((2n+2)/3).
R(n) = binomial(n-floor((k+1)/2), n-floor((3k-1)/2)), k = 1..floor((2n+2)/3), gives the terms of each row in reverse order.

Extensions

Entry revised by N. J. A. Sloane, Jul 07 2024

A331545 Triangle of constant term of the symmetric q-binomial coefficients.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 2, 2, 1, 1, 1, 0, 3, 0, 3, 0, 1, 1, 1, 3, 5, 5, 3, 1, 1, 1, 0, 4, 0, 8, 0, 4, 0, 1, 1, 1, 4, 8, 12, 12, 8, 4, 1, 1, 1, 0, 5, 0, 18, 0, 18, 0, 5, 0, 1, 1, 1, 5, 13, 24, 32, 32, 24, 13, 5, 1, 1, 1, 0, 6, 0, 33
Offset: 0

Views

Author

Michael Somos, Jan 19 2020

Keywords

Comments

Symmetric q-binomial coefficients are based on symmetric q-numbers [n] := (q^n-1/q^n)/(q-1/q).

Examples

			Triangle begins:
  n\k| 0 1 2 3 4 5 6 7  ...
  ---+----------------
   0 | 1
   1 | 1 1
   2 | 1 0 1
   3 | 1 1 1 1
   4 | 1 0 2 0 1
   5 | 1 1 2 2 1 1
   6 | 1 0 3 0 3 0 1
   7 | 1 1 3 5 5 3 1 1
   ...
		

Crossrefs

Programs

  • Mathematica
    T[ n_, k_] := Coefficient[ QBinomial[ n, k, x^2] / x^(k (n - k)) // FunctionExpand // Expand, x, 0];
  • PARI
    {T(n, k) = if( k<0 || k>n, 0, polcoeff( prod(j = 1, k, (x^(n+1-j) - x^(-n-1+j))/(x^j - x^(-j))), 0))};

Formula

T(2*n, 2*k+1) = 0. T(2*n+1, 3) = A000982(n). T(2*n+1, 5) = A001973(n) if n>=2. T(4*n, 2*n) = A063074(n).
Showing 1-6 of 6 results.