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.

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).

A002838 Balancing weights on the integer line.

Original entry on oeis.org

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: 1

Views

Author

Keywords

Comments

Also number of partitions of n(n+1)/2 into up to n parts each no greater than n+1, partitions of n(n+3)/2 into exactly n parts each no greater than n+2 and partitions of n(n+1) into exactly n distinct parts each no greater than 2n+1, thus providing balancing solutions for n weights in distinct integer positions on [ -n,n] with a pivot at 0. - Henry Bottomley, Aug 09 2002
Is this a shifted version of A076822? - Vladimir Reshetnikov, Oct 06 2016

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A047997, A076822, A188181 (columns 1, 2).

Programs

  • Mathematica
    (* This program is not convenient for large values of n *) a[n_] := Length[ IntegerPartitions[n*(n+1)/2, n, Range[n+1]]]; Table[ Print[{n, an = a[n]}]; an, {n, 1, 16}] (* Jean-François Alcover, Jan 02 2013 *)

Formula

a(n) = A047997(n, n) = A067059(n, n+1). a(n) tends towards (sqrt(12)/Pi)*4^n/n^2 and something like (sqrt(12)/Pi)*4^n/(n^2+1.85*n+0.8) seems to give an even closer approximation. - Henry Bottomley, Aug 09 2002

Extensions

More terms from Henry Bottomley, Aug 09 2002

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

A119551 Number of ordered finite sequences a_1 <= a_2 <= ... <= a_n of length n of positive integers less than or equal to n whose product is n! and whose sum is n * (n + 1) / 2.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 6, 6, 22, 22, 60, 159, 377, 377, 1007, 1007, 2867, 8147, 22403, 22403, 67808, 176128, 495053, 1362240, 4210266, 4210266, 14223808, 14223808, 42235255, 129279396, 370630653, 1178215490
Offset: 0

Views

Author

Jens Voß, May 30 2006

Keywords

Comments

a(n) is also the number of lattice points in a sequence of polytopes. Given n, define a vector x(k) = #{j : a_j = k} and define a matrix A with n columns as follows: first row all 1 (gives length of a_j); second row 1,2,...,n (sum of a_j); finally one row for each prime p <= n with entries A(row p, column k) = maximum exponent of p that divides k, e.g., A(p=2,k=8)=3 because 2^3|8 (this gives factorization of product of a_j). Then a(n) is the number of nonnegative integer lattice points in the polytope A*x = A*(1,1,1...)T. - Martin Fuller, Feb 12 2023

Examples

			a(9) = 2 because the sequences (1, 2, 3, 4, 5, 6, 7, 8, 9) and (1, 2, 4, 4, 4, 5, 7, 9, 9) both add up to 45 and multiply up to 9!.
		

Crossrefs

Cf. A000040, A000142, A000217, A076822 without restriction on product, A120690 without restriction on sum.

Programs

  • Mathematica
    a[n_] := a[n] = Module[{b}, b[c_, s_, p_, m_] := b[c, s, p, m] = Module[{x}, If[c <= 0 || m <= 1 || s <= c || s > m*c, Boole[ c == s && p == 1], x = IntegerExponent[p, m]; Sum[b[c - i, s - m*i, p/m^i, m - 1], {i, x*Boole@PrimeQ[m], x} ]]]; b[n, n*(n + 1)/2, n!, n]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 32}] (* Jean-François Alcover, Jul 05 2022, after Martin Fuller *)
  • PARI
    a(n) = (b(c,s,p,m) = local(x); if(c<=0||m<=1||s<=c||s>m*c, c==s&&p==1, x=valuation(p,m); sum(i=x*isprime(m), x, b(c-i,s-m*i,p/m^i,m-1)))); b(n,n*(n+1)/2,n!,n) \\ Martin Fuller, Jun 26 2006

Formula

a(p) = a(p-1) for prime p. - Alois P. Heinz, Jul 05 2022

Extensions

a(18) and a(19) from John W. Layman, Jun 08 2006
More terms from Martin Fuller, Jun 26 2006
a(0)=1 prepended by Alois P. Heinz, Jul 05 2022
a(36)-a(61) from Martin Fuller, Feb 12 2023

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