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

A188181 T(n,k) is the number of strictly increasing arrangements of n numbers in -(n+k-2)..(n+k-2) with sum zero.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 5, 5, 1, 4, 8, 12, 12, 1, 5, 13, 24, 32, 32, 1, 6, 18, 43, 73, 94, 94, 1, 7, 25, 69, 141, 227, 289, 289, 1, 8, 32, 104, 252, 480, 734, 910, 910, 1, 9, 41, 150, 414, 920, 1656, 2430, 2934, 2934, 1, 10, 50, 207, 649, 1636, 3370, 5744, 8150, 9686, 9686, 1, 11
Offset: 1

Views

Author

R. H. Hardin, Mar 23 2011

Keywords

Examples

			Table starts
....1....1.....1.....1......1......1......1.......1.......1.......1.......1
....1....2.....3.....4......5......6......7.......8.......9......10......11
....2....5.....8....13.....18.....25.....32......41......50......61......72
....5...12....24....43.....69....104....150.....207.....277.....362.....462
...12...32....73...141....252....414....649.....967....1394....1944....2649
...32...94...227...480....920...1636...2739....4370....6698....9926...14293
...94..289...734..1656...3370...6375..11322...19138...30982...48417...73316
..289..910..2430..5744..12346..24591..46029...81805..139143..227930..361384
..910.2934..8150.20094..45207..94257.184717..343363..610358.1043534.1724882
.2934.9686.27718.70922.165821.360002.734517.1421530.2628824.4672836.8022362
Some solutions for n=7 and k=5:
.-7...-9...-8..-10...-6...-6...-9...-8...-8...-7...-9..-10...-9...-8...-9...-7
.-5...-7...-6...-7...-5...-5...-4...-6...-7...-3...-8...-5...-3...-7...-5...-4
.-3...-1...-5...-4...-4...-3...-1...-4...-5...-2...-6...-3...-1...-3...-4...-3
.-1....0...-1....3...-3...-2....0...-1....0...-1....4....0....1....1...-1...-1
..3....3....2....5...-1....1....1....4....3....0....5....3....3....2....4....0
..4....4....8....6....9....7....4....5....7....4....6....5....4....5....6....7
..9...10...10....7...10....8....9...10...10....9....8...10....5...10....9....8
		

Crossrefs

Column 1 is A076822.
Column 2 is A002838.
Cf. A000982.

Formula

T(3,n) = A000982(n+1).

A133406 Half the number of ways of placing up to n pawns on a length n chessboard row so that the row balances at its middle.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 10, 9, 26, 24, 76, 69, 236, 214, 760, 696, 2522, 2326, 8556, 7942, 29504, 27562, 103130, 96862, 364548, 344004, 1300820, 1232567, 4679472, 4449850, 16952162, 16171118, 61790442, 59107890, 226451036, 217157069, 833918840
Offset: 1

Views

Author

R. H. Hardin, Nov 24 2007

Keywords

Comments

Odd-indexed terms are A047653.
Also the number of subsets of {1..n-1} that are empty or have mean (n-1)/2. - Gus Wiseman, Apr 23 2023

Examples

			From _Gus Wiseman_, Apr 23 2023: (Start)
The a(1) = 1 through a(8) = 9 subsets:
  {}  {}  {}   {}     {}       {}         {}           {}
          {1}  {1,2}  {2}      {1,4}      {3}          {1,6}
                      {1,3}    {2,3}      {1,5}        {2,5}
                      {1,2,3}  {1,2,3,4}  {2,4}        {3,4}
                                          {1,2,6}      {1,2,4,7}
                                          {1,3,5}      {1,2,5,6}
                                          {2,3,4}      {1,3,4,6}
                                          {1,2,3,6}    {2,3,4,5}
                                          {1,2,4,5}    {1,2,3,4,5,6}
                                          {1,2,3,4,5}
(End)
		

Crossrefs

For median instead of mean we have A361801 + 1, the doubling of A024718.
Not counting the empty set gives A362046 (shifted left).
A007318 counts subsets by length, A327481 by integer mean.
A047653 counts subsets of {1..2n} with mean n, nonempty A212352.
A070925 counts subsets of {1..2n-1} with mean n, nonempty A000980.
A327475 counts subsets with integer mean, nonempty A051293.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Length[#]==0||Mean[#]==n/2&]],{n,0,10}] (* Gus Wiseman, Apr 23 2023 *)
  • PARI
    a(n) = {polcoef(prod(k=1, n, 1 + 'x^(2*k-n-1)), 0)/2} \\ Andrew Howroyd, Jan 07 2023

Formula

From Gus Wiseman, Apr 23 2023: (Start)
a(2n+1) = A000980(n)/2 = A047653(n).
a(n) = A362046(n-1) + 1.
(End)

A216635 T(n,k)=Number of nondecreasing arrays of n 0..n-1 integers with the sum of their k'th powers equal to sum(i^k,i=0..n-1).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 1, 1, 12, 1, 1, 1, 1, 2, 32, 1, 1, 1, 1, 1, 4, 94, 1, 1, 1, 1, 1, 1, 14, 289, 1, 1, 1, 1, 1, 1, 3, 37, 910, 1, 1, 1, 1, 1, 1, 2, 8, 105, 2934, 1, 1, 1, 1, 1, 1, 1, 3, 18, 309, 9686, 1, 1, 1, 1, 1, 1, 1, 1, 6, 42, 939, 32540, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 100, 2903
Offset: 1

Views

Author

R. H. Hardin Sep 11 2012

Keywords

Comments

Table starts
.......1......1.....1....1...1..1.1.1.1
.......1......1.....1....1...1..1.1.1.1
.......2......1.....1....1...1..1.1.1.1
.......5......1.....1....1...1..1.1.1.1
......12......2.....1....1...1..1.1.1.1
......32......4.....1....1...1..1.1.1.1
......94.....14.....3....2...1..1.1.1.1
.....289.....37.....8....3...1..1.1.1.1
.....910....105....18....6...1..1.1.1.1
....2934....309....42...12...1..1.1.1.1
....9686....939...100...24...1..2.1.1.1
...32540...2903...265...63...2..2.1.1.1
..110780...8865...775..164...7..2.1.1.1
..381676..28163..2241..424..15..5.1.1.1
.1328980..90648..6709.1163..33.11.1.1.1
.4669367.297615.20661.2919.100.18.1.1.1

Examples

			All solutions for n=8 k=4
..1....0....0
..4....1....1
..4....2....3
..4....3....3
..4....4....5
..5....5....6
..5....6....6
..7....7....6
		

Crossrefs

Column 1 is A002838(n-1)
sum 1..n instead of 0..n-1: A216645

A216645 T(n,k)=Number of nondecreasing arrays of n 1..n integers with the sum of their k powers equal to sum(i^k,i=1..n).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 32, 1, 1, 1, 1, 1, 3, 94, 1, 1, 1, 1, 1, 2, 8, 289, 1, 1, 1, 1, 1, 1, 2, 25, 910, 1, 1, 1, 1, 1, 1, 2, 6, 83, 2934, 1, 1, 1, 1, 1, 1, 1, 2, 12, 257, 9686, 1, 1, 1, 1, 1, 1, 1, 1, 5, 30, 788, 32540, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 76, 2491
Offset: 1

Views

Author

R. H. Hardin Sep 11 2012

Keywords

Comments

Table starts
.......1......1.....1....1..1..1.1
.......1......1.....1....1..1..1.1
.......2......1.....1....1..1..1.1
.......5......1.....1....1..1..1.1
......12......1.....1....1..1..1.1
......32......3.....2....1..1..1.1
......94......8.....2....2..1..1.1
.....289.....25.....6....2..1..1.1
.....910.....83....12....5..1..1.1
....2934....257....30...11..1..2.1
....9686....788....76...25..1..2.1
...32540...2491...224...51..2..2.1
..110780...7885...597..136..4..2.1
..381676..25099..1801..367..8..3.1
.1328980..80481..5469..886.21..3.1
.4669367.264505.16958.2507.45.14.1

Examples

			All solutions for n=8 k=4
..1....1
..3....2
..3....3
..5....4
..6....5
..6....6
..6....7
..8....8
		

Crossrefs

Column 1 is A002838(n-1)
sum 0..n-1 instead of 1..n: A216635

A076822 Number of partitions of the n-th triangular number involving only the numbers 1..n and with exactly n terms.

Original entry on oeis.org

1, 1, 1, 2, 5, 12, 32, 94, 289, 910, 2934, 9686, 32540, 110780, 381676, 1328980, 4669367, 16535154, 58965214, 211591218, 763535450, 2769176514, 10089240974, 36912710568, 135565151486, 499619269774, 1847267563742, 6850369296298
Offset: 0

Views

Author

Jon Perry, Nov 19 2002

Keywords

Comments

Asymptotic to (sqrt(3)/(2*Pi))*(4^n/n^2). It is the number of lattice paths from (0,0) to (n,n-1) with steps only to the right or upward and having area n(n-1)/2 between the path and the x-axis. In the reference by Takács use formula (77) with a=n, b=n(n-1)/2 and then Stirling's formula. - Kent E. Morrison, May 28 2016
a(n) is the number of fair dice with n sides and expected value (n+1)/2 with distinct composition of numbers between 1 and n. - Felix Huber, Aug 02 2024

Examples

			a(4)=5 as T(4)=10= 1+1+4+4 =1+2+3+4 = 1+3+3+3 = 2+2+2+4 = 2+2+3+3.
		

Crossrefs

Cf. A002838. [From R. J. Mathar, Sep 20 2008]
Cf. A188181 (columns 1, 2).

Programs

  • JavaScript
    ccc=new Array(); cccc=0;
    for (n=1; n<11; n++)
    {
        str='cc=0; for (i1=1; i1<'+(n+1)+'; i1++)';
        str2='i1';
        str3='i1';
        tn=1;
        for (i=2; i<=n; i++)
        {
            str+='for (i'+i+'=i'+(i-1)+'; i'+i+'<'+(n+1)+'; i'+i+'++)';
            str2+='+i'+i;
            str3+=', ", ", i'+i;
            tn+=i;
        }
        str+='if ('+str2+'=='+tn+') document.print(++cc, ":", '+str3+', "
    ")'; eval(str); ccc[cccc++ ]=cc; document.print('****
    '); } document.write(ccc);
  • Mathematica
    f[n_] := Block[{p = IntegerPartitions[n(n + 1)/2, n]}, Length[ Select[p, Length[ # ] == n &]]]; Table[ f[n], {n, 1, 13}]

Formula

a(n) = A067059(n,n+1); also a(n) = T[n*(n-1)/2, n-1, n] with T[ ] defined as in A047993. - Martin Fuller, Jun 27 2006

Extensions

Edited and extended to 12 terms by Robert G. Wilson v, Nov 23 2002
Further terms from Max Alekseyev, May 24 2007
a(0)=1 prepended by Alois P. Heinz, May 28 2016

A047997 Triangle of numbers a(n,k) = number of balance positions when k equal weights are placed at a k-subset of the points {-n, -(n-1), ..., n-1, n} on a centrally pivoted rod.

Original entry on oeis.org

1, 1, 2, 1, 3, 5, 1, 4, 8, 12, 1, 5, 13, 24, 32, 1, 6, 18, 43, 73, 94, 1, 7, 25, 69, 141, 227, 289, 1, 8, 32, 104, 252, 480, 734, 910, 1, 9, 41, 150, 414, 920, 1656, 2430, 2934, 1, 10, 50, 207, 649, 1636, 3370, 5744, 8150, 9686, 1, 11, 61, 277, 967
Offset: 1

Views

Author

Keywords

Comments

Also the number of k-subsets of {1..2n-1} with mean n. - Gus Wiseman, Apr 16 2023

Examples

			From _Gus Wiseman_, Apr 18 2023: (Start)
Triangle begins:
    1
    1    2
    1    3    5
    1    4    8   12
    1    5   13   24   32
    1    6   18   43   73   94
    1    7   25   69  141  227  289
    1    8   32  104  252  480  734  910
    1    9   41  150  414  920 1656 2430 2934
Row n = 4 counts the following balanced subsets:
  {0}  {-1,1}  {-1,0,1}   {-3,0,1,2}
       {-2,2}  {-2,0,2}   {-4,0,1,3}
       {-3,3}  {-3,0,3}   {-2,-1,0,3}
       {-4,4}  {-3,1,2}   {-2,-1,1,2}
               {-4,0,4}   {-3,-1,0,4}
               {-4,1,3}   {-3,-1,1,3}
               {-2,-1,3}  {-3,-2,1,4}
               {-3,-1,4}  {-3,-2,2,3}
                          {-4,-1,1,4}
                          {-4,-1,2,3}
                          {-4,-2,2,4}
                          {-4,-3,3,4}
(End)
		

Crossrefs

Last column is a(n,n) = A002838(n).
Row sums are A212352(n) = A047653(n)-1 = A000980(n)/2-1.
A007318 counts subsets by length, A327481 by mean, A013580 by median.
A327475 counts subsets with integer mean.

Programs

  • Mathematica
    a[n_, k_] := Length[ IntegerPartitions[ n*(2k - n + 1)/2, n, Range[2k - n + 1]]]; Flatten[ Table[ a[n, k], {k, 1, 11}, {n, 1, k}]] (* Jean-François Alcover, Jan 02 2012 *)
    Table[Length[Select[Subsets[Range[-n,n]],Length[#]==k&&Total[#]==0&]],{n,8},{k,n}] (* Gus Wiseman, Apr 16 2023 *)

Formula

Equivalent to number of partitions of n(2k-n+1)/2 into up to n parts each no more than 2k-n+1 so a(n, k)=A067059(n, n(2k-n+1)/2); row sums are A047653(n)-1 = A212352(n). - Henry Bottomley, Aug 11 2001

A277218 Maximal coefficient among the polynomials in row n of the triangle of q-binomial coefficients.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 5, 8, 12, 20, 32, 58, 94, 169, 289, 526, 910, 1667, 2934, 5448, 9686, 18084, 32540, 61108, 110780, 208960, 381676, 723354, 1328980, 2527074, 4669367, 8908546, 16535154, 31630390, 58965214, 113093022, 211591218, 406680465, 763535450, 1470597342, 2769176514, 5342750699, 10089240974
Offset: 0

Views

Author

Vladimir Reshetnikov, Oct 05 2016

Keywords

Comments

q-binomial coefficients are polynomials in q with integer coefficients.
Is A055606 a shifted version of this sequence?

Examples

			Row 5 of the triangle of q-binomial coefficients is [1, 1 + q + q^2 + q^3 + q^4, 1 + q + 2*q^2 + 2*q^3 + 2*q^4 + q^5 + q^6, 1 + q + 2*q^2 + 2*q^3 + 2*q^4 + q^5 + q^6, 1 + q + q^2 + q^3 + q^4, 1], so the max coefficient is 2. Hence a(5) = 2.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k, c, v, q;
      uses QDifferenceEquations;
      v:= 0:
      for k from 0 to n do
        c:= coeffs(expand(expand(QBinomial(n,k,q))),q);
        v:= max(v, max(c));
      od:
    v
    end proc:
    map(f, [$0..50]); # Robert Israel, Oct 05 2016
  • Mathematica
    Table[Coefficient[Expand[FunctionExpand[QBinomial[n, Floor[n/2], q]]], q, Floor[n^2/8]], {n, 0, 30}] (* Vladimir Reshetnikov, Sep 24 2021 *)

Formula

a(n) ~ sqrt(3) * 2^(n+2) / (Pi * n^2). - Vaclav Kotesovec, Oct 09 2016

A277271 Second largest coefficient among the polynomials in row n of the triangle of q-binomial coefficients.

Original entry on oeis.org

1, 1, 2, 4, 7, 11, 19, 30, 55, 90, 166, 285, 519, 902, 1656, 2929, 5424, 9673, 18012, 32467, 60981, 110599, 208445, 381301, 722552, 1327869, 2522994, 4665786, 8902311, 16524759, 31594853, 58935171, 113038371, 211499060, 406350261, 763246536, 1470080699
Offset: 4

Views

Author

Vladimir Reshetnikov, Oct 07 2016

Keywords

Comments

q-binomial coefficients are polynomials in q with integer coefficients.

Examples

			Row 5 of the triangle of q-binomial coefficients is [1, 1 + q + q^2 + q^3 + q^4, 1 + q + 2*q^2 + 2*q^3 + 2*q^4 + q^5 + q^6, 1 + q + 2*q^2 + 2*q^3 + 2*q^4 + q^5 + q^6, 1 + q + q^2 + q^3 + q^4, 1]. The largest coefficient is 2, and the second largest coefficient is 1. Hence A277218(5) = 2 and a(5) = 1.
		

Crossrefs

Cf. A002838, A022166, A029895, A055606, A076822, A277218 (largest coefficients).

Programs

  • Mathematica
    Table[(Union @@ Table[CoefficientList[FunctionExpand[QBinomial[n, k, q]], q], {k, 0, n}])[[-2]], {n, 4, 40}]
Showing 1-8 of 8 results.