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

A204459 Square array A(n,k), n>=0, k>=0, read by antidiagonals: A(n,k) is the number of k-element subsets that can be chosen from {1,2,...,k*n} having element sum k*(k*n+1)/2.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 2, 1, 1, 0, 1, 0, 3, 0, 1, 0, 1, 8, 8, 4, 1, 1, 0, 1, 0, 33, 0, 5, 0, 1, 0, 1, 58, 141, 86, 25, 6, 1, 1, 0, 1, 0, 676, 0, 177, 0, 7, 0, 1, 0, 1, 526, 3370, 3486, 1394, 318, 50, 8, 1, 1, 0, 1, 0, 17575, 0, 11963, 0, 519, 0, 9, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Jan 15 2012

Keywords

Comments

A(n,k) is the number of partitions of k*(k*n+1)/2 into k distinct parts <=k*n.
A(n,k) = 0 if k>0 and (n = 0 or k*(k*n+1) mod 2 = 1).

Examples

			A(0,0) = 1: {}.
A(1,1) = 1: {1}.
A(5,1) = 1: {3}.
A(1,5) = 1: {1,2,3,4,5}.
A(2,2) = 2: {1,4}, {2,3}.
A(3,2) = 3: {1,6}, {2,5}, {3,4}.
A(2,3) = 0: no subset of {1,2,3,4,5,6} has element sum 3*(3*2+1)/2 = 21/2.
A(4,2) = 4: {1,8}, {2,7}, {3,6}, {4,5}.
A(3,3) = 8: {1,5,9}, {1,6,8}, {2,4,9}, {2,5,8}, {2,6,7}, {3,4,8}, {3,5,7}, {4,5,6}.
A(2,4) = 8: {1,2,7,8}, {1,3,6,8}, {1,4,5,8}, {1,4,6,7}, {2,3,5,8}, {2,3,6,7}, {2,4,5,7}, {3,4,5,6}.
Square array A(n,k) begins:
  1, 0, 0,  0,   0,    0,     0,      0, ...
  1, 1, 1,  1,   1,    1,     1,      1, ...
  1, 0, 2,  0,   8,    0,    58,      0, ...
  1, 1, 3,  8,  33,  141,   676,   3370, ...
  1, 0, 4,  0,  86,    0,  3486,      0, ...
  1, 1, 5, 25, 177, 1394, 11963, 108108, ...
  1, 0, 6,  0, 318,    0, 32134,      0, ...
  1, 1, 7, 50, 519, 5910, 73294, 957332, ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember;
          `if`(it*(2*i-t+1)/2, 0,
          `if`(n=0, 1, b(n, i-1, t) +`if`(n
    				
  • Mathematica
    b[n_, i_, t_] /; it*((2*i-t+1)/2) = 0; b[0, , ] = 1; b[n_, i_, t_] := b[n, i, t] = b[n, i-1, t] + If[n, 0] = 1; a[0, ] = 0; a[n_, k_] := With[{s = k*(k*n+1)}, If[Mod[s, 2] == 1, 0, b[s/2, k*n, k]]]; Flatten[ Table[ a[n, d-n], {d, 0, 15}, {n, 0, d}]] (* Jean-François Alcover, Jun 15 2012, translated from Maple, after Alois P. Heinz *)

A188211 T(n,k)=Number of nondecreasing arrangements of n numbers in -(n+k-2)..(n+k-2) with sum zero.

Original entry on oeis.org

1, 1, 2, 1, 3, 5, 1, 4, 8, 18, 1, 5, 13, 33, 73, 1, 6, 18, 55, 141, 338, 1, 7, 25, 86, 252, 676, 1656, 1, 8, 32, 126, 414, 1242, 3370, 8512, 1, 9, 41, 177, 649, 2137, 6375, 17575, 45207, 1, 10, 50, 241, 967, 3486, 11322, 33885, 94257, 246448, 1, 11, 61, 318, 1394, 5444
Offset: 1

Views

Author

R. H. Hardin Mar 24 2011

Keywords

Comments

Table starts
......1......1.......1.......1.......1.......1........1........1........1
......2......3.......4.......5.......6.......7........8........9.......10
......5......8......13......18......25......32.......41.......50.......61
.....18.....33......55......86.....126.....177......241......318......410
.....73....141.....252.....414.....649.....967.....1394.....1944.....2649
....338....676....1242....2137....3486....5444.....8196....11963....17002
...1656...3370....6375...11322...19138...30982....48417....73316...108108
...8512..17575...33885...61731..107233..178870...288100...450096...684572
..45207..94257..184717..343363..610358.1043534..1724882..2767118..4323349
.246448.517971.1028172.1943488.3521260.6147894.10388788.17052653.27273240

Examples

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

Crossrefs

Column 1 is A039744
Column 2 is A109655
Row 3 is A000982(n+2)
Row 5 is A188183(n+2)
Row 7 is A188185(n+3)

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

A161407 Number of partitions of n^2 into parts smaller than n.

Original entry on oeis.org

1, 0, 1, 5, 30, 185, 1226, 8442, 60289, 442089, 3314203, 25295011, 195990980, 1538069121, 12203218743, 97746332667, 789480879664, 6423539487002, 52607252796831, 433368610079872, 3588859890833443, 29862449600982149, 249560820679038935, 2093852201126089073
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 10 2009

Keywords

Examples

			a(3) = #{2+2+2+2+1, 2+2+2+1+1+1, 2+2+5x1, 2+7x1, 9x1} = 5.
		

Crossrefs

Programs

  • Maple
    a := proc (n) local G, Gser: G := 1/(product(1-x^j, j = 1 .. n-1)): Gser := series(G, x = 0, n^2+5): coeff(Gser, x, n^2) end proc: 1, seq(a(n), n = 1 .. 23); # Emeric Deutsch, Jun 20 2009
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1,
         `if`(i<1, 0, b(n, i-1)+`if`(i>n, 0, b(n-i, i))))
        end:
    a:= n-> b(n^2, n-1):
    seq(a(n), n=0..30);  # Alois P. Heinz, Dec 21 2014
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i]]]]; a[n_] := b[n^2, n-1]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 30 2015, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n / n^2, where d = A258268 = 9.153370192454122461948530292401354... and c = 0.0881548837986971165169272782933415... - Vaclav Kotesovec, Sep 08 2021

Extensions

More terms from Emeric Deutsch, Jun 20 2009
a(0)=1 from Alois P. Heinz, Dec 21 2014
Showing 1-4 of 4 results.