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-7 of 7 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

A063074 Number of partitions of 2n^2 whose Ferrers-plot fits within a 2n X 2n box; number of ways to cut a 2n X 2n chessboard into two equal-area pieces along a non-descending line from lower left to upper right.

Original entry on oeis.org

1, 2, 8, 58, 526, 5448, 61108, 723354, 8908546, 113093022, 1470597342, 19499227828, 262754984020, 3589093760726, 49596793134484, 692260288169282, 9747120868919060, 138298900243896166, 1975688102624819336, 28396056820503468894, 410363630540693436398
Offset: 0

Views

Author

Wouter Meeussen, Aug 03 2001

Keywords

Comments

Also the number of subsets of {1,...,4*n} containing exactly 2*n elements with total sum n*(4*n+1) (see also A060468 for a related sequence). This is of course the same as the number of partitions of n*(4*n+1) having 2*n distinct parts of length at most 4*n. This number is the coefficient of t^0 q^0 in Product_{k=1..4*n} (t*q^k + 1/(t*q^k)). - Roland Bacher, May 02 2002
A bijection with a dissection as above of the 2n X 2n checkerboard is given by subtracting 1,2,3,...,2n of the smallest, second-smallest, etc. element in the subset. Example for n=2: {1,2,7,8} (yields the checkerboard partition {1-1,2-2,7-3,8-4}={0,0,4,4}), {1,3,6,8} (yields {1-1,3-2,6-3,8-4}={0,1,3,4}), {1,4,5,8} (yields {0,2,2,4}), {1,4,6,7} (yields {0,2,3,3}), {3,4,5,6} (yields {2,2,2,2}), {2,4,5,7} (yields {1,2,2,3}), {2,3,6,7} (yields {1,1,3,3}), {2,3,5,8} (yields {1,1,2,4}).
Appears to be the number of random walks of length 4n, moves +/-1, starting and ending at 0 and with signed area 0 under the path. It would be nice to have a lower bound of the form a(n) > c*2^{4n}/n^d. - David_Mumford(AT)brown.edu, Jun 25 2003

Examples

			For a 4 X 4 board (n=2) the 8 partitions are (4,4,0,0), (4,3,1,0), (4,2,1,1), (4,2,2,0), (3,3,2,0), (3,3,1,1), (3,2,2,1), (2,2,2,2).
		

Crossrefs

Bisection of row n=2 of A204459. - Alois P. Heinz, Jan 18 2012

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 b(n*(4*n+1), 4*n, 2*n):
    seq(a(n), n=0..25);  # Alois P. Heinz, Jan 18 2012
  • Mathematica
    Table[ Length@Select[ IntegerPartitions[ 2n^2 ], Length[ # ] <= 2n && First[ # ] <= 2n& ], {n, 1, 5} ] or faster: Table[ T[ 2n^2, 2n, 2n ], {n, 0, 24} ] with T[ m, a, b ] as defined in A047993.
    (* second program: *)
    b[n_, i_, t_] := b[n, i, t] =  If[i < t || n < t (t + 1)/2 || n > t (2i - t + 1)/2, 0, If[n == 0, 1, b[n, i - 1, t] + If[n < i, 0, b[n - i, i - 1, t - 1]]]]; a[n_] := b[n (4n + 1), 4n, 2n]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Aug 29 2016, after Alois P. Heinz *)

Formula

a(n) = A029895(2n) = A067059(2n, 2n) = A107110(2n, 2n^2). a(n) seems to be close to (sqrt(75)/Pi)*16^n/(20n^2+6n+1). - Henry Bottomley, May 12 2005

Extensions

More terms from Alois P. Heinz, Jan 18 2012

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

A077048 Doubly restricted composition numbers: number of compositions of [n^2/2] into up to n positive integers each no more than n.

Original entry on oeis.org

1, 1, 2, 6, 44, 350, 4292, 57036, 996088, 18661152, 424241102, 10266964015, 287927722315, 8541887839459, 285144784116376, 10016752944160536, 388044155110294856, 15749295719801313452, 694726457246902921502
Offset: 0

Views

Author

Henry Bottomley, Oct 22 2002

Keywords

Examples

			a(3)=6 since the number of compositions of [3^2/2]=4 into up to 3 positive integers each no more than 3 are: 1+1+2, 1+2+1, 1+3, 2+1+1, 2+2, 3+1.
		

Crossrefs

Formula

Similar in magnitude to A077045.

A241810 Number of balanced orbitals over n sectors.

Original entry on oeis.org

1, 1, 0, 0, 2, 6, 0, 6, 8, 36, 0, 88, 58, 376, 0, 1096, 526, 4476, 0, 14200, 5448, 57284, 0, 190206, 61108, 764812, 0, 2615268, 723354, 10499504, 0, 36677626, 8908546, 147110276, 0, 522288944, 113093022
Offset: 0

Views

Author

Peter Luschny, Apr 29 2014

Keywords

Comments

For the combinatorial definitions see A232500. An orbital is balanced if its integral is 0. The integral of an orbital w over n sectors is Sum_{k=1..n} Sum_{i=1..k} w(i) where w(i) are the jumps of the orbital represented by -1, 0, 1.

Crossrefs

Programs

  • Mathematica
    np[z_]:=Module[{i,j},For[i=Length[z],i>1&&z[[i-1]]>=z[[i]],i--];For[j=Length[z],z[[j]]<=z[[i-1]],j--];Join[Take[z,i-2],{z[[j]]},Reverse[Drop[ReplacePart[z,z[[i-1]],j],i-1]]]];o=Table[1,{16}];
    n=0;f=0;Print[1];Print[1];While[n<16,n++;f=1-f;If[OddQ[f*n],Print[0],p=Join[-Take[o,n],{f},Take[o,n-f]];c=0;Do[If[Accumulate[Accumulate[p]][[-1]]==0,c++];p=np[p],{(2*n+1-f)!/(2*n!^2)}];Print[2*c]];n=n-f]
    (* Hans Havermann, May 10 2014 *)
  • Sage
    def A241810(n):
        if n == 0: return 1
        A = 0
        T = [0] if is_odd(n) else []
        for i in (1..n//2):
            T.append(-1); T.append(1)
        for p in Permutations(T):
            P = 0; S = 0
            for k in (0..n-1):
                P += p[k]; S += P
            if S == 0: A += 1
        return A
    [A241810(n) for n in (0..32)]

Formula

a(2*n) = A204459(2, n).
a(2*n+1) = A242087(n).
a(4*n) = A063074(n) = A029895(2*n) = A067059(2*n, 2*n).
a(4*n+2) = 0 for all n (proved by H. Havermann).

Extensions

More terms from Hans Havermann, May 10 2014
a(35), a(36) from Hans Havermann, May 23 2014

A107110 Square array by antidiagonals where T(n,k) is the number of partitions of k into no more than n parts each no more than n. Visible version of A063746.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 1, 0, 0, 1, 2, 1, 1, 0, 0, 1, 3, 2, 1, 1, 0, 0, 0, 3, 3, 2, 1, 1, 0, 0, 0, 3, 5, 3, 2, 1, 1, 0, 0, 0, 3, 5, 5, 3, 2, 1, 1, 0, 0, 0, 2, 7, 7, 5, 3, 2, 1, 1, 0, 0, 0, 1, 7, 9, 7, 5, 3, 2, 1, 1, 0, 0, 0, 1, 8, 11, 11, 7, 5, 3, 2, 1, 1, 0, 0, 0, 0, 7, 14, 13, 11, 7, 5, 3, 2
Offset: 0

Views

Author

Henry Bottomley, May 12 2005

Keywords

Examples

			Rows start 1,0,0,0,...; 1,1,0,0,0,...; 1,1,2,1,1,0,0,0,...; 1,1,2,3,3,3,3,2,1,1,0,0,0,...; 1,1,2,3,5,5,7,7,8,7,7,5,5,3,2,1,1,0,0,0,...; etc.
T(4,6)=7 since 6 can be written seven ways with no more than 4 parts each no more than 4: 4+2, 4+1+1, 3+3, 3+2+1, 3+1+1+1, 2+2+2, or 2+2+1+1.
		

Crossrefs

Cf. A063746. Fifth row is A102422.

Formula

See A063746 for formulas. T(n, k)=A000041(k) if n>=k. T(n, k)=T(n, n^2-k). T(n, [n^2/2])=A029895(n); T(2n, 2n^2)=A063074(n). Row sums are A000984.

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