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.

A115276 Number of partitions of {1,...,n} into block sizes not a multiple of 4.

Original entry on oeis.org

1, 1, 2, 5, 14, 47, 173, 702, 3124, 14901, 76405, 417210, 2411466, 14731095, 94573911, 636575050, 4480990936, 32887804361, 251236573561, 1993395483746, 16397468177406, 139634290253907, 1229013163330947, 11166172488138322, 104593176077399652
Offset: 0

Views

Author

Christian G. Bower, Jan 18 2006

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(`if`(
          irem(j, 4)=0, 0, binomial(n-1, j-1)*a(n-j)), j=1..n))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Mar 17 2015
  • Mathematica
    a[n_] := a[n] = If[n == 0, 1, Sum[If[Mod[j, 4] == 0, 0, Binomial[n - 1, j - 1]*a[n - j]], {j, 1, n}]]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 20 2016, after Alois P. Heinz *)

Formula

E.g.f.: exp(sinh(x)+(cosh(x)-cos(x))/2).

A115277 Number of partitions of {1,...,n} into blocks such that no even sized block is repeated.

Original entry on oeis.org

1, 1, 2, 5, 12, 37, 143, 562, 2320, 10941, 54865, 283890, 1604155, 9558226, 58668223, 384572975, 2631778832, 18576630237, 137919691717, 1060303298138, 8415786131309, 69538205444478, 591734670548037, 5194542789203877, 47127033586211659, 438972204436025198
Offset: 0

Views

Author

Christian G. Bower, Jan 18 2006

Keywords

Crossrefs

Programs

  • Maple
    with(combinat):
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
           multinomial(n, n-i*j, i$j)/j!*b(n-i*j, i-1), j=0..min(
           `if`(irem(i, 2)=0, 1, n), n/i))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..30);  # Alois P. Heinz, Mar 08 2015
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, Sum[multinomial[n, Join[{n-i*j}, Array[i&, j]]]/j! * b[n-i*j, i-1], {j, 0, Min[If[Mod[i, 2]==0, 1, n], n/i]}]]]; a[n_] :=  b[n, n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Oct 25 2015, after Alois P. Heinz *)

Formula

E.g.f.: exp(sinh(x)) * Product {m >= 1} (1+x^(2*m)/(2*m)!).

A360182 Number of partitions of [n] where each block size occurs at most twice.

Original entry on oeis.org

1, 1, 2, 4, 14, 41, 152, 575, 2634, 13207, 59927, 312170, 1946870, 10547135, 65168469, 421552409, 3148178034, 20138277895, 141300123713, 1063603633154, 9108280640649, 68154636145922, 549824347467969, 4551458909818969, 39948625639349706, 406913301246314341
Offset: 0

Views

Author

Alois P. Heinz, May 13 2023

Keywords

Examples

			a(0) = 1: (), the empty partition.
a(1) = 1: 1.
a(2) = 2: 12, 1|2.
a(3) = 4: 123, 12|3, 13|2, 1|23.
a(4) = 14: 1234, 123|4, 124|3, 12|34, 12|3|4, 134|2, 13|24, 13|2|4, 14|23, 1|234, 1|23|4, 14|2|3, 1|24|3, 1|2|34.
a(5) = 41: 12345, 1234|5, 1235|4, 123|45, 123|4|5, 1245|3, 124|35, 124|3|5, 125|34, 12|345, 12|34|5, 125|3|4, 12|35|4, 12|3|45, 1345|2, 134|25, 134|2|5, 135|24, 13|245, 13|24|5, 135|2|4, 13|25|4, 13|2|45, 145|23, 14|235, 14|23|5, 15|234, 1|2345, 1|234|5, 15|23|4, 1|235|4, 1|23|45, 145|2|3, 14|25|3, 14|2|35, 15|24|3, 1|245|3, 1|24|35, 15|2|34, 1|25|34, 1|2|345.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(combinat[multinomial](n, n-i*j, i$j)/j!*
            b(n-i*j, i-1), j=0..min(2, n/i))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..25);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[multinomial[n, {n - i*j}~Join~ Table[i, {j}]]/j!*b[n - i*j, i - 1], {j, 0, Min[2, n/i]}]]];
    a[n_] :=  b[n, n];
    Table[a[n], {n, 0, 25}](* Jean-François Alcover, Nov 21 2023, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=0..2} A271423(n,k).
Showing 1-3 of 3 results.