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

A243081 Number A(n,k) of compositions of n into parts with multiplicity not larger than k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 3, 0, 1, 1, 2, 3, 3, 0, 1, 1, 2, 4, 7, 5, 0, 1, 1, 2, 4, 7, 11, 11, 0, 1, 1, 2, 4, 8, 15, 21, 13, 0, 1, 1, 2, 4, 8, 15, 26, 34, 19, 0, 1, 1, 2, 4, 8, 16, 31, 52, 59, 27, 0, 1, 1, 2, 4, 8, 16, 31, 57, 93, 114, 57, 0, 1, 1, 2, 4, 8, 16, 32, 63, 114, 173, 178, 65, 0
Offset: 0

Views

Author

Alois P. Heinz, May 29 2014

Keywords

Comments

A(n,k) is the number of compositions of n avoiding the pattern {1}^(k+1).

Examples

			Square array A(n,k) begins:
  1,  1,  1,  1,   1,   1,   1,   1,   1, ...
  0,  1,  1,  1,   1,   1,   1,   1,   1, ...
  0,  1,  2,  2,   2,   2,   2,   2,   2, ...
  0,  3,  3,  4,   4,   4,   4,   4,   4, ...
  0,  3,  7,  7,   8,   8,   8,   8,   8, ...
  0,  5, 11, 15,  15,  16,  16,  16,  16, ...
  0, 11, 21, 26,  31,  31,  32,  32,  32, ...
  0, 13, 34, 52,  57,  63,  63,  64,  64, ...
  0, 19, 59, 93, 114, 120, 127, 127, 128, ...
		

Crossrefs

Main diagonal gives A011782.
A(2n,n) gives A232605.

Programs

  • Maple
    b:= proc(n, i, p, k) option remember; `if`(n=0, p!, `if`(i<1, 0,
          add(b(n-i*j, i-1, p+j, k)/j!, j=0..min(n/i, k))))
        end:
    A:= (n, k)-> `if`(k>=n, `if`(n=0, 1, 2^(n-1)), b(n$2, 0, k)):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_, p_, k_] := b[n, i, p, k] = If[n == 0, p!, If[i<1, 0,
         Sum[b[n-i*j, i-1, p+j, k]/j!, {j, 0, Min[n/i, k]}]]];
    A[n_, k_] := If[k >= n, If[n == 0, 1, 2^(n-1)], b[n, n, 0, k]];
    Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Feb 02 2015, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{i=0..k} A242447(n,i).

A232623 Number of partitions of 2*n into parts with multiplicity <= n.

Original entry on oeis.org

1, 1, 4, 9, 19, 37, 70, 124, 216, 363, 597, 960, 1519, 2359, 3617, 5469, 8173, 12079, 17680, 25630, 36848, 52547, 74383, 104556, 146018, 202651, 279631, 383719, 523813, 711502, 961902, 1294552, 1734788, 2315171, 3077592, 4075658, 5377900, 7071523, 9267454
Offset: 0

Views

Author

Alois P. Heinz, Nov 27 2013

Keywords

Examples

			a(1) = 1: [2].
a(2) = 4: [2,1,1], [2,2], [3,1], [4].
a(3) = 9: [2,2,1,1], [2,2,2], [3,1,1,1], [3,2,1], [3,3], [4,1,1], [4,2], [5,1], [6].
a(4) = 19: [2,2,1,1,1,1], [2,2,2,1,1], [2,2,2,2], [3,2,1,1,1], [3,2,2,1], [3,3,1,1], [3,3,2], [4,1,1,1,1], [4,2,1,1], [4,2,2], [4,3,1], [4,4], [5,1,1,1], [5,2,1], [5,3], [6,1,1], [6,2], [7,1], [8].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1,
          `if`(i>n, 0, add(b(n-i*j, i+1, min(k,
           iquo(n-i*j, i+1))), j=0..min(n/i, k))))
        end:
    a:= n-> b(2*n, 1, n):
    seq(a(n), n=0..50);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i>n, 0, Sum[b[n-i*j, i+1, Min[k, Quotient[n-i*j, i+1]]], {j, 0, Min[n/i, k]}]]]; a[n_] := b[2*n, 1, n]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 11 2015, after Alois P. Heinz *)
    A232623[n_] := PartitionsP[2*n] - PartitionsP[n - 1];
    Array[A232623, 50, 0] (* Paolo Xausa, Jul 17 2025 *)
  • PARI
    a(n) = numbpart(2*n) - numbpart(n-1); \\ Michel Marcus, Jul 13 2025

Formula

a(n) = A061199(n,2*n).
a(n) ~ exp(2*Pi*sqrt(n/3))/(8*n*sqrt(3)). - Vaclav Kotesovec, Nov 27 2013
a(n) = A000041(2*n) - A000041(n-1). - Alan Michael Gómez Calderón, Jul 12 2025

A232665 Number of compositions of 2n such that the largest multiplicity of parts equals n.

Original entry on oeis.org

1, 1, 4, 5, 21, 49, 176, 513, 1720, 5401, 17777, 57421, 188657, 617177, 2033176, 6697745, 22139781, 73262233, 242931322, 806516561, 2681475049, 8925158441, 29740390673, 99196158145, 331163178476, 1106489052969, 3699881730901, 12380449027325, 41454579098853
Offset: 0

Views

Author

Alois P. Heinz, Nov 27 2013

Keywords

Comments

a(n) = A238342(2n,n) = A242447(2n,n).

Examples

			a(1) = 1: [2].
a(2) = 4: [2,2], [1,2,1], [2,1,1], [1,1,2].
a(3) = 5: [2,2,2], [1,3,1,1], [1,1,3,1], [3,1,1,1], [1,1,1,3].
a(4) = 21: [2,2,2,2], [1,1,4,1,1], [4,1,1,1,1], [1,4,1,1,1], [1,1,1,4,1], [1,1,1,1,4], [1,2,1,1,1,2], [2,1,1,1,1,2], [2,1,2,1,1,1], [1,2,2,1,1,1],[1,2,1,2,1,1], [2,1,1,2,1,1], [1,2,1,1,2,1], [2,1,1,1,2,1],[1,1,2,1,2,1], [1,1,2,2,1,1], [2,2,1,1,1,1], [1,1,1,2,2,1], [1,1,2,1,1,2], [1,1,1,2,1,2], [1,1,1,1,2,2].
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
         `if`(n<5, [1, 1, 4, 5, 21][n+1],
          ((n-1)*(14911*n^4 -102036*n^3 +249203*n^2
           -252880*n +87794) *a(n-1)
          +(27528*n^5 -239548*n^4 +803564*n^3 -1283816*n^2
           +963472*n -266160) *a(n-2)
          -2*(2*n-5)*(10323*n^4 -62876*n^3 +136848*n^2
           -125584*n +40329) *a(n-3)
          +2*(2*n-7)*(n-2)*(1147*n^3 -4055*n^2 +4742*n
           -1762) *a(n-4)) / (5*(n-1)*n*
          (1147*n^3 -7496*n^2 +16293*n -11706)))
        end:
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0, 1, If[nJean-François Alcover, Feb 09 2015, after A238342 *)

Formula

Recurrence: see Maple program.
a(n) ~ c*r^n/sqrt(Pi*n), where r = 3.408698199842151... is the root of the equation 4 - 32*r - 8*r^2 + 5*r^3 = 0 and c = 0.479880052557486135... is the root of the equation 1 + 384*c^2 - 2368*c^4 + 2960*c^6 = 0. - Vaclav Kotesovec, Nov 27 2013
Showing 1-3 of 3 results.