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.

Previous Showing 21-30 of 105 results. Next

A185895 Exponential generating function is (1-x^1/1!)(1-x^2/2!)(1-x^3/3!)....

Original entry on oeis.org

1, -1, -1, 2, 3, 14, -40, -43, -357, -1762, 8004, 13067, 78540, 492439, 3932305, -26867293, -44643557, -363632466, -1729625764, -15939972937, -145669871232, 1488599170613, 3515325612655, 26765194180353, 151925998229148
Offset: 0

Views

Author

Michael Somos, Feb 05 2011

Keywords

Comments

From Peter Bala, Mar 17 2022: (Start)
Conjectures: 1) a(n) differs in sign from a(n-1) iff n is a triangular number (checked up to n = 1225 = (50*51)/2)
2) The same property holds for the coefficients of A(x)^2, the square of the o.g.f. A(x) = 1 - x - x^2 + 2*x^3 + 3*x^4 + ... : A(x)^2 = 1 - 2*x - x^2 + 6*x^3 + 3*x^4 + 18*x^5 - 110*x^6 - 22*x^7 - 483*x^8 - 2800*x^9 + 20030*x^10 + ....
3) The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all primes p and positive integers n and k. (End)

Crossrefs

Programs

  • PARI
    {a(n) = if( n<0, 0, n! * polcoeff( prod( k=1, n, 1 - x^k / k!, 1 + x * O(x^n)), n))}
    
  • PARI
    {a(n)=if(n<0,0,if(n==0,1,sum(k=1,n,(n-1)!/(n-k)!*a(n-k)*sumdiv(k,d,-d*d!^(-k/d)))))} [Hanna]

Formula

E.g.f.: Product_{k>0} (1 - x^k/k!).
a(n) = Sum_{k=1..n} (n-1)!/(n-k)!*b(k)*a(n-k), where b(k) = Sum_{d divides k} -d*d!^(-k/d) and a(0) = 1 [cf. Vladeta Jovovic's formula in A007837].
E.g.f.: exp(-Sum_{k>=1} Sum_{j>=1} x^(j*k)/(k*(j!)^k)). - Ilya Gutkovskiy, Jun 18 2018

A275313 Number of set partitions of [n] where adjacent blocks differ in size.

Original entry on oeis.org

1, 1, 1, 4, 7, 23, 100, 333, 1443, 6910, 36035, 186958, 1095251, 6620976, 42151463, 290483173, 2030271491, 15044953241, 116044969497, 930056879535, 7749440529803, 66931578540965, 597728811956244, 5511695171795434, 52578231393128128, 515775207055816041
Offset: 0

Views

Author

Alois P. Heinz, Jul 22 2016

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(`if`(i=j, 0,
          b(n-j, `if`(j>n-j, 0, j))*binomial(n-1, j-1)), j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, Sum[If[i==j, 0, b[n-j, If[j>n-j, 0, j]]* Binomial[n-1, j-1]], {j, 1, n}]]; a[n_] := b[n, 0]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Dec 18 2016, after Alois P. Heinz *)

A327869 Sum T(n,k) of multinomials M(n; lambda), where lambda ranges over all partitions of n into distinct parts incorporating k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 4, 3, 3, 1, 5, 4, 0, 4, 1, 16, 5, 10, 10, 5, 1, 82, 66, 75, 60, 15, 6, 1, 169, 112, 126, 35, 140, 21, 7, 1, 541, 456, 196, 336, 280, 224, 28, 8, 1, 2272, 765, 1548, 1848, 1386, 630, 336, 36, 9, 1, 17966, 15070, 15525, 16080, 14070, 3780, 1050, 480, 45, 10, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 28 2019

Keywords

Comments

Here we assume that every list of parts has at least one 0 because its addition does not change the value of the multinomial.
Number T(n,k) of set partitions of [n] with distinct block sizes and one of the block sizes is k. T(5,3) = 10: 123|45, 124|35, 125|34, 12|345, 134|25, 135|24, 13|245, 145|23, 14|235, 15|234.

Examples

			Triangle T(n,k) begins:
      1;
      1,     1;
      1,     0,     1;
      4,     3,     3,     1;
      5,     4,     0,     4,     1;
     16,     5,    10,    10,     5,    1;
     82,    66,    75,    60,    15,    6,    1;
    169,   112,   126,    35,   140,   21,    7,   1;
    541,   456,   196,   336,   280,  224,   28,   8,  1;
   2272,   765,  1548,  1848,  1386,  630,  336,  36,  9,  1;
  17966, 15070, 15525, 16080, 14070, 3780, 1050, 480, 45, 10, 1;
  ...
		

Crossrefs

Columns k=0-3 give: A007837, A327876, A327881, A328155.
Row sums give A327870.
T(2n,n) gives A328156.

Programs

  • Maple
    with(combinat):
    T:= (n, k)-> add(multinomial(add(i, i=l), l[], 0),
                 l=select(x-> nops(x)=nops({x[]}) and
                 (k=0 or k in x), partition(n))):
    seq(seq(T(n, k), k=0..n), n=0..11);
    # second Maple program:
    b:= proc(n, i, k) option remember; `if`(i*(i+1)/2 n!*(b(n$2, 0)-`if`(k=0, 0, b(n$2, k))):
    seq(seq(T(n, k), k=0..n), n=0..11);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[i(i+1)/2 < n, 0, If[n==0, 1, If[i<2, 0, b[n, i-1, If[i==k, 0, k]]] + If[i==k, 0, b[n-i, Min[n-i, i-1], k]/i!]]];
    T[n_, k_] := n! (b[n, n, 0] - If[k == 0, 0, b[n, n, k]]);
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 28 2020, from 2nd Maple program *)

A032299 "EFJ" (unordered, size, labeled) transform of 1,2,3,4,...

Original entry on oeis.org

1, 1, 2, 9, 16, 85, 516, 1519, 6280, 45441, 431740, 1394371, 8370924, 43960657, 459099018, 6135631545, 23813007376, 150537761905, 1029390040764, 7519458731131, 101693768415220, 1909742186139921, 8269148260309882, 60924484457661793, 417027498430063800
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    mmax = 25;
    egf = Product[1 + x^m/(m - 1)!, {m, 1, mmax}] + O[x]^mmax;
    CoefficientList[egf, x] * Range[0, mmax - 1]! (* Jean-François Alcover, Sep 23 2019 *)
  • PARI
    seq(n)={Vec(serlaplace(prod(k=1, n, 1 + k*x^k/k! + O(x*x^n))))} \\ Andrew Howroyd, Sep 11 2018

Formula

E.g.f.: Product_{m>0} (1+x^m/(m-1)!). - Vladeta Jovovic, Nov 26 2002
E.g.f.: exp(Sum_{k>=1} Sum_{j>=1} (-1)^(k+1)*x^(j*k)/(k*((j - 1)!)^k)). - Ilya Gutkovskiy, Sep 13 2018

Extensions

a(0)=1 prepended and terms a(23) and beyond from Andrew Howroyd, Sep 11 2018

A275309 Number of set partitions of [n] with decreasing block sizes.

Original entry on oeis.org

1, 1, 1, 3, 4, 11, 36, 82, 239, 821, 3742, 10328, 42934, 156070, 729249, 4025361, 15032099, 68746675, 334541624, 1645575386, 9104991312, 65010298257, 282768687257, 1616844660914, 8660050947383, 53262316928024, 309119883729116, 2185141720645817
Offset: 0

Views

Author

Alois P. Heinz, Jul 22 2016

Keywords

Examples

			a(3) = 3: 123, 12|3, 13|2.
a(4) = 4: 1234, 123|4, 124|3, 134|2.
a(5) = 11: 12345, 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 1345|2, 134|25, 135|24, 145|23.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember;
          `if`(n>i*(i+1)/2, 0, `if`(n=0, 1, b(n, i-1)+
          `if`(i>n, 0, b(n-i, i-1)*binomial(n-1, i-1))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n > i*(i + 1)/2, 0, If[n == 0, 1, b[n, i - 1] +  If[i > n, 0, b[n - i, i - 1]*Binomial[n - 1, i - 1]]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jan 21 2017, translated from Maple *)

A275310 Number of set partitions of [n] with nonincreasing block sizes.

Original entry on oeis.org

1, 1, 2, 4, 11, 30, 102, 346, 1353, 5444, 24170, 110082, 546075, 2777828, 15099359, 84491723, 499665713, 3035284304, 19375261490, 126821116410, 866293979945, 6072753348997, 44193947169228, 329387416656794, 2542173092336648, 20069525888319293
Offset: 0

Views

Author

Alois P. Heinz, Jul 22 2016

Keywords

Examples

			a(3) = 4: 123, 12|3, 13|2, 1|2|3.
a(4) = 11: 1234, 123|4, 124|3, 12|34, 12|3|4, 134|2, 13|24, 13|2|4, 14|23, 14|2|3, 1|2|3|4.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(
          b(n-j, j)*binomial(n-1, j-1), j=1..min(n, i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, Sum[b[n-j, j]*Binomial[n-1, j-1], {j, 1, Min[n, i]}]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Feb 02 2017, translated from Maple *)

A275311 Number of set partitions of [n] with nondecreasing block sizes.

Original entry on oeis.org

1, 1, 2, 3, 7, 12, 43, 89, 363, 1096, 4349, 14575, 77166, 265648, 1369284, 6700177, 33526541, 162825946, 1034556673, 5157939218, 33054650345, 206612195885, 1244742654646, 8071979804457, 62003987375957, 381323590616995, 2827411772791596, 22061592185044910
Offset: 0

Views

Author

Alois P. Heinz, Jul 22 2016

Keywords

Examples

			a(3) = 3: 123, 1|23, 1|2|3.
a(4) = 7: 1234, 12|34, 13|24, 14|23, 1|234, 1|2|34, 1|2|3|4.
a(5) = 12: 12345, 12|345, 13|245, 14|235, 15|234, 1|2345, 1|23|45, 1|24|35, 1|25|34, 1|2|345, 1|2|3|45, 1|2|3|4|5.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          add(b(n-j, j)*binomial(n-1, j-1), j=i..n))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n-j, j]*Binomial[n-1, j-1], {j, i, n}]]; a[n_] := b[n, 1]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jan 22 2017, translated from Maple *)

A275312 Number of set partitions of [n] with increasing block sizes.

Original entry on oeis.org

1, 1, 1, 2, 2, 6, 11, 28, 51, 242, 532, 1545, 6188, 16592, 86940, 302909, 967523, 3808673, 23029861, 71772352, 484629531, 1840886853, 9376324526, 37878035106, 204542429832, 1458360522892, 6241489795503, 45783932444672, 211848342780210, 1137580874772724
Offset: 0

Views

Author

Alois P. Heinz, Jul 22 2016

Keywords

Examples

			a(4) = 2: 1234, 1|234.
a(5) = 6: 12345, 12|345, 13|245, 14|235, 15|234, 1|2345.
a(6) = 11: 123456, 12|3456, 13|2456, 14|2356, 15|2346, 16|2345, 1|23456, 1|23|456, 1|24|356, 1|25|346, 1|26|345.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
         `if`(i>n, 0, b(n, i+1)+b(n-i, i+1)*binomial(n-1, i-1)))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i > n, 0, b[n, i+1] + b[n-i, i+1] * Binomial[n-1, i-1]]]; a[n_] := b[n, 1]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jan 22 2017, translated from Maple *)

A326026 Number of non-isomorphic multiset partitions of weight n where each part has a different length.

Original entry on oeis.org

1, 1, 2, 7, 12, 35, 111, 247, 624, 1843, 6717, 15020, 46847, 124808, 412577, 1658973, 4217546, 12997734, 40786810, 126971940, 437063393, 2106317043, 5499108365, 19037901867, 59939925812, 210338815573, 683526043801, 2741350650705, 14848209030691, 41533835240731, 151548411269815
Offset: 0

Views

Author

Gus Wiseman, Jul 13 2019

Keywords

Comments

The number of non-isomorphic multiset partitions of weight n is A007716(n).

Examples

			Non-isomorphic representatives of the a(1) = 1 through a(4) = 12 multiset partitions:
  {{1}}  {{1,1}}  {{1,1,1}}    {{1,1,1,1}}
         {{1,2}}  {{1,2,2}}    {{1,1,2,2}}
                  {{1,2,3}}    {{1,2,2,2}}
                  {{1},{1,1}}  {{1,2,3,3}}
                  {{1},{2,2}}  {{1,2,3,4}}
                  {{1},{2,3}}  {{1},{1,1,1}}
                  {{2},{1,2}}  {{1},{1,2,2}}
                               {{1},{2,2,2}}
                               {{1},{2,3,3}}
                               {{1},{2,3,4}}
                               {{2},{1,2,2}}
                               {{3},{1,2,3}}
		

Crossrefs

Programs

  • PARI
    EulerT(v)={Vec(exp(x*Ser(dirmul(v,vector(#v,n,1/n))))-1, -#v)}
    D(p,n)={my(v=vector(n)); for(i=1, #p, v[p[i]]++); my(u=EulerT(v)); polcoef(prod(k=1, #u, 1 + u[k]*x^k + O(x*x^n)), n)/prod(i=1, #v, i^v[i]*v[i]!)}
    a(n)={my(s=0); forpart(p=n, s+=D(p,n)); s} \\ Andrew Howroyd, Feb 08 2020

Extensions

Terms a(11) and beyond from Andrew Howroyd, Feb 08 2020

A361864 Number of set partitions of {1..n} whose block-medians have integer median.

Original entry on oeis.org

1, 0, 3, 6, 30, 96, 461, 2000, 10727, 57092, 342348
Offset: 1

Views

Author

Gus Wiseman, Apr 04 2023

Keywords

Comments

The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The a(1) = 1 through a(4) = 6 set partitions:
  {{1}}  .  {{123}}      {{1}{234}}
            {{13}{2}}    {{123}{4}}
            {{1}{2}{3}}  {{1}{2}{34}}
                         {{12}{3}{4}}
                         {{1}{24}{3}}
                         {{13}{2}{4}}
The set partition {{1,2},{3},{4}} has block-medians {3/2,3,4}, with median 3, so is counted under a(4).
		

Crossrefs

For mean instead of median we have A361865.
For sum instead of outer median we have A361911, means A361866.
A000110 counts set partitions.
A000975 counts subsets with integer median, mean A327475.
A013580 appears to count subsets by median, A327481 by mean.
A308037 counts set partitions with integer average block-size.
A325347 counts partitions w/ integer median, complement A307683.
A360005 gives twice median of prime indices, distinct A360457.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],IntegerQ[Median[Median/@#]]&]],{n,6}]
Previous Showing 21-30 of 105 results. Next