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.

A332721 Number of compositions of n^2 with parts <= n, such that each element of [n] is used at least once.

Original entry on oeis.org

1, 1, 3, 72, 5752, 1501620, 1171326960, 2571831080160, 15245263511750160, 236246829658682027760, 9325247205993698149853760, 917699267902161951609308035200, 221117091698491444413008381486903040, 128433050637127079872089064922773889126400
Offset: 0

Views

Author

Alois P. Heinz, Feb 21 2020

Keywords

Examples

			a(2) = 3: 112, 121, 211.
a(3) = 72: 111123, 111132, 111213, 111231, 111312, 111321, 112113, 112131, 112311, 113112, 113121, 113211, 121113, 121131, 121311, 123111, 131112, 131121, 131211, 132111, 211113, 211131, 211311, 213111, 231111, 311112, 311121, 311211, 312111, 321111, 11223, 11232, 11322, 12123, 12132, 12213, 12231, 12312, 12321, 13122, 13212, 13221, 21123, 21132, 21213, 21231, 21312, 21321, 22113, 22131, 22311, 23112, 23121, 23211, 31122, 31212, 31221, 32112, 32121, 32211, 1233, 1323, 1332, 2133, 2313, 2331, 3123, 3132, 3213, 3231, 3312, 3321.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0 or i=1, (p+n)!
           /(n+1)!, add(b(n-i*j, i-1, p+j)/(j+1)!, j=0..n/i))
        end:
    a:= n-> b(n*(n-1)/2, n$2):
    seq(a(n), n=0..15);
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0 || i == 1, (p + n)!/(n + 1)!, Sum[b[n - i*j, i - 1, p + j]/(j + 1)!, {j, 0, n/i}]];
    a[n_] := b[n(n - 1)/2, n, n];
    Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Mar 04 2022, after Alois P. Heinz *)

Formula

a(n) = A373118(n^2,n). - Alois P. Heinz, May 26 2024

A332716 Number of compositions of n^2 where each part is less than or equal to n.

Original entry on oeis.org

1, 1, 5, 149, 20569, 11749641, 26649774581, 236837126431501, 8237168505776637425, 1125036467745713090813969, 606147434557459526483161067501, 1293596348252277644272081532560154645, 10970544241076481629439275072320816659677161
Offset: 0

Views

Author

Alois P. Heinz, Feb 20 2020

Keywords

Comments

All terms are odd.

Examples

			a(2) = 5: 22, 211, 121, 112, 1111.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1,
          add(b(n-d, k), d=1..min(n, k)))
        end:
    a:= n-> b(n^2, n):
    seq(a(n), n=0..15);
  • Mathematica
    b[n_, k_] := b[n, k] = If[n == 0, 1, Sum[b[n - d, k], {d, 1, Min[n, k]}]];
    a[n_] := b[n^2, n];
    Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Oct 31 2022, after Alois P. Heinz *)

Formula

a(n) = Sum_{i=0..n-1} A048004(n^2-1,i) for i > 0.

A332747 Number of compositions of n^2, such that each element of [n] is used at least once as a part.

Original entry on oeis.org

1, 1, 3, 72, 6232, 1621620, 1241237520, 2675188471920, 15634073104902000, 239929277724680059440, 9411787539302194544158080, 922671287397731617736789070720, 221805878984619105095368813189002240, 128660270226206951104782827202740054476800
Offset: 0

Views

Author

Alois P. Heinz, Feb 21 2020

Keywords

Comments

Some parts can be larger than n. Adding the condition that parts cannot be larger than n, we get A332721. Removing from A332721 the condition that each element of [n] has to be used, we get A332716.

Examples

			a(4) = 6232: all permutations of 4321111111, 432211111, 43222111, 4322221, 43321111, 4332211, 433321, 4432111, 443221, 543211, 64321.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p, m) option remember; `if`(n=0, p!,
          `if`(i<1, 0, (t-> add(b(n-i*j, i-1, p+j, t)/(j+
          `if`(t=0, 1, 0))!, j=0..n/i))(`if`(i>m, m, 0))))
        end:
    a:= n-> b(n*(n-1)/2$2, n$2):
    seq(a(n), n=0..15);
  • Mathematica
    b[n_, i_, p_, m_] := b[n, i, p, m] = If[n == 0, p!,
         If[i < 1, 0, Function[t, [b[n - i*j, i - 1, p + j, t]/(j +
         If[t == 0, 1, 0])!, {j, 0, n/i}]][If[i > m, m, 0]]]];
    a[n_] := b[n(n-1)/2, n(n-1)/2, n, n];
    Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Sep 08 2021, after Alois P. Heinz *)

A333048 Number of compositions of n^2 into powers of n.

Original entry on oeis.org

1, 1, 6, 20, 96, 572, 3971, 31201, 272334, 2605268, 27042522, 302171806, 3611295430, 45911641817, 618074912240, 8776287336812, 130994094465946, 2049114914257540, 33504826964461451, 571285301051283841, 10136481840545237652, 186803012671904648805
Offset: 0

Views

Author

Alois P. Heinz, Mar 06 2020

Keywords

Examples

			a(0) = 1: the empty composition.
a(1) = 1: 1.
a(2) = 6: 1111, 112, 121, 211, 22, 4.
a(3) = 20: 111111111, 1111113, 1111131, 1111311, 1113111, 1131111, 1311111, 3111111, 11133, 11313, 11331, 13113, 13131, 13311, 31113, 31131, 31311, 33111, 333, 9.
		

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n<2, 1, 1+add(binomial(n*(n-j)+j, j), j=0..n)):
    seq(a(n), n=0..21);

Formula

a(n) = 1 + Sum_{j=0..n} binomial(n*(n-j)+j,j) if n>1, a(0) = a(1) = 1.
Showing 1-4 of 4 results.