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

A322768 Column 3 of array in A322765.

Original entry on oeis.org

66, 249, 1075, 5133, 26683, 149410, 894124, 5683643, 38186471, 270054693, 2003233849, 15539557832, 125727364954, 1058517565329, 9254401000167, 83864649249661, 786443164853871, 7620060523287298, 76182494678422156, 784894262599538443, 8323844770001318027, 90767456208155581709
Offset: 0

Views

Author

N. J. A. Sloane, Dec 30 2018

Keywords

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778.

Crossrefs

Programs

  • PARI
    T(n, k) = if(k==0, sum(j=0, n, stirling(n, j, 2)), (T(n+2, k-1)+T(n+1, k-1)+sum(j=0, k-1, binomial(k-1, j)*T(n, j)))/2);
    vector(20, n, T(n-1, 3)) \\ Seiichi Manyama, Nov 21 2020

A322766 Row 1 of array in A322765.

Original entry on oeis.org

1, 4, 26, 249, 3274, 56135, 1207433, 31638625, 987249425, 36030130677, 1515621707692, 72603595393584, 3920675798922189, 236615520916677436, 15840357595697061964, 1168697367186883073296, 94486667847573203169757, 8328527812527985862657297, 796762955545266206229493979
Offset: 0

Views

Author

N. J. A. Sloane, Dec 30 2018

Keywords

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          add(b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    A:= proc(n, k) option remember; `if`(n A(n, n+1):
    seq(a(n), n=0..22);  # Alois P. Heinz, Jul 21 2021
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1,
         Sum[b[n - j]*Binomial[n-1, j-1], {j, 1, n}]];
    A[n_, k_] := A[n, k] = If[n < k, A[k, n],
         If[k == 0, b[n], (A[n+1, k - 1] + Sum[A[n - k + j, j]*
         Binomial[k-1, j], {j, 0, k - 1}] + A[n, k - 1])/2]];
    a[n_] := A[n, n + 1];  Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Jun 01 2022, after Alois P. Heinz *)

Formula

a(n) = A346500(n,n+1) = A346500(n+1,n). - Alois P. Heinz, Jul 21 2021

A322767 Row 2 of array in A322765.

Original entry on oeis.org

2, 11, 92, 1075, 16601, 325269, 7837862, 226700129, 7720099374, 304732680254, 13763771702539, 703691774091622, 40351866669219915, 2574830780826344436, 181574292457398520558, 14065771632972561098569, 1190588796562104776974207
Offset: 0

Views

Author

N. J. A. Sloane, Dec 30 2018

Keywords

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          add(b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    A:= proc(n, k) option remember; `if`(n A(n, n+2):
    seq(a(n), n=0..22);  # Alois P. Heinz, Jul 21 2021
  • Mathematica
    P[m_, n_] := P[m, n] = If[n == 0, BellB[m], (1/2)(P[m+2, n-1] + P[m+1, n-1] + Sum[Binomial[n-1, k] P[m, k], {k, 0, n-1}])];
    a[n_] := P[2, n];
    Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Apr 29 2022 *)

Formula

a(n) = A346500(n,n+2) = A346500(n+2,n). - Alois P. Heinz, Jul 21 2021

A322769 Main diagonal of array in A322765.

Original entry on oeis.org

1, 4, 92, 5133, 537813, 91914202, 23456071495, 8411911367949, 4055497274641836, 2540939492105630071, 2014322292658946180922, 1977121111959534634757742, 2360026677940190304494287625, 3374607252811005168634470847052, 5706308288951111509370981721908854
Offset: 0

Views

Author

N. J. A. Sloane, Dec 30 2018

Keywords

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          add(b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    A:= proc(n, k) option remember; `if`(n A(2*n, n):
    seq(a(n), n=0..15);  # Alois P. Heinz, Jul 21 2021
  • Mathematica
    P[m_, n_] := P[m, n] = If[n == 0, BellB[m], (1/2)(P[m+2, n-1] + P[m+1, n-1] + Sum[Binomial[n-1, k] P[m, k], {k, 0, n-1}])];
    a[n_] := P[n, n];
    Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Apr 29 2022 *)

Formula

a(n) = A346500(2n,n). - Alois P. Heinz, Jul 20 2021

A020555 Number of multigraphs on n labeled edges (with loops). Also number of genetically distinct states amongst n individuals.

Original entry on oeis.org

1, 2, 9, 66, 712, 10457, 198091, 4659138, 132315780, 4441561814, 173290498279, 7751828612725, 393110572846777, 22385579339430539, 1419799938299929267, 99593312799819072788, 7678949893962472351181, 647265784993486603555551, 59357523410046023899154274
Offset: 0

Views

Author

Gilbert Labelle (gilbert(AT)lacim.uqam.ca), Simon Plouffe, N. J. A. Sloane

Keywords

Comments

Also the number of factorizations of (p_n#)^2. - David W. Wilson, Apr 30 2001
Also the number of multiset partitions of {1, 1, 2, 2, 3, 3, ..., n, n}. - Gus Wiseman, Jul 18 2018
a(n) gives the number of genetically distinct states for n diploid individuals in the case that maternal and paternal alleles transmitted to the individuals are not distinguished (if maternal and paternal alleles are distinguished, then the number of states is A000110(2n)). - Noah A Rosenberg, Aug 23 2022

Examples

			From _Gus Wiseman_, Jul 18 2018: (Start)
The a(2) = 9 multiset partitions of {1, 1, 2, 2}:
  (1122),
  (1)(122), (2)(112), (11)(22), (12)(12),
  (1)(1)(22), (1)(2)(12), (2)(2)(11),
  (1)(1)(2)(2).
(End)
		

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778. - N. J. A. Sloane, Dec 30 2018
  • E. Keith Lloyd, Math. Proc. Camb. Phil. Soc., vol. 103 (1988), 277-284.
  • A. Murthy, Generalization of partition function, introducing Smarandache factor partitions. Smarandache Notions Journal, Vol. 11, No. 1-2-3, Spring 2000.
  • G. Paquin, Dénombrement de multigraphes enrichis, Mémoire, Math. Dept., Univ. Québec à Montréal, 2004.

Crossrefs

Row n=2 of A219727. - Alois P. Heinz, Nov 26 2012
See also A322764. Row 0 of the array in A322765.
Main diagonal of A346500.

Programs

  • Maple
    B := n -> combinat[bell](n):
    P := proc(m,n) local k; global B; option remember;
    if n = 0 then B(m)  else
    (1/2)*( P(m+2,n-1) + P(m+1,n-1) + add( binomial(n-1,k)*P(m,k), k=0..n-1) ); fi; end;
    r:=m->[seq(P(m,n),n=0..20)]; r(0); # N. J. A. Sloane, Dec 30 2018
  • Mathematica
    max = 16; s = Series[Exp[-3/2 + Exp[x]/2]*Sum[Exp[Binomial[n+1, 2]*x]/n!, {n, 0, 3*max }], {x, 0, max}] // Normal; a[n_] := SeriesCoefficient[s, {x, 0, n}]*n!; Table[a[n] // Round, {n, 0, max} ] (* Jean-François Alcover, Apr 23 2014, after Vladeta Jovovic *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    Table[Length[mps[Ceiling[Range[1/2,n,1/2]]]],{n,5}] (* Gus Wiseman, Jul 18 2018 *)

Formula

Lloyd's article gives a complicated explicit formula.
E.g.f.: exp(-3/2 + exp(x)/2)*Sum_{n>=0} exp(binomial(n+1, 2)*x)/n! [probably in the Labelle paper]. - Vladeta Jovovic, Apr 27 2004
a(n) = A001055(A002110(n)^2). - Alois P. Heinz, Aug 23 2022

A035098 Near-Bell numbers: partitions of an n-multiset with multiplicities 1, 1, 1, ..., 1, 2.

Original entry on oeis.org

1, 2, 4, 11, 36, 135, 566, 2610, 13082, 70631, 407846, 2504071, 16268302, 111378678, 800751152, 6027000007, 47363985248, 387710909055, 3298841940510, 29119488623294, 266213358298590, 2516654856419723, 24566795704844210
Offset: 1

Views

Author

Keywords

Comments

A035098 and A000070 are near the two ends of a spectrum. Another way to look at A000070 is as the number of partitions of an n-multiset with multiplicities n-1, 1.
The very ends are the number of partitions and the Stirling numbers of the second kind, which count the n-multiset partitions with multiplicities n and 1,1,1,...,1, respectively.
Intermediate sequences are the number of ways of partitioning an n-multiset with multiplicities some partition of n.

Examples

			a(3)=4 because there are 4 ways to partition the multiset {1,2,2} (with multiplicities {1,2}): {{1,2,2}} {{1,2},{2}} {{1},{2,2}} {{1},{2},{2}}.
		

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778. - N. J. A. Sloane, Dec 30 2018

Crossrefs

Row sums of A241500.
Column 1 of array in A322765.
Row n=2 of A346426.

Programs

  • Maple
    with(combinat): a:= n-> floor(1/2*(bell(n-2)+bell(n-1)+bell(n))): seq(a(n), n=1..25); # Zerinvary Lajos, Oct 07 2007
  • Mathematica
    f[n_] := Sum[ StirlingS2[n, k] ((k + 1) (k + 2)/2 + 1), {k, 0, n}]; Array[f, 22, 0]
    f[n_] := (BellB[n] + BellB[n + 1] + BellB[n + 2])/2; Array[f, 22, 0]
    Range[0, 21]! CoefficientList[ Series[ (1 + Exp@ x)^2/2 Exp[ Exp@ x - 1], {x, 0, 21}], x] (* 3 variants by Robert G. Wilson v, Jan 13 2011 *)
    Join[{1},Total[#]/2&/@Partition[BellB[Range[0,30]],3,1]] (* Harvey P. Dale, Jan 02 2019 *)

Formula

Sum_{k=0..n} Stirling2(n, k)*((k+1)*(k+2)/2+1). E.g.f.: 1/2*(1+exp(x))^2*exp(exp(x)-1). (1/2)*(Bell(n)+Bell(n+1)+Bell(n+2)). - Vladeta Jovovic, Sep 23 2003 [for offset -1]
a(n) ~ Bell(n)/2 * (1 + LambertW(n)/n). - Vaclav Kotesovec, Jul 28 2021

Extensions

More terms from Vladeta Jovovic, Sep 23 2003

A346500 Number A(n,k) of partitions of the (n+k)-multiset {1,2,...,n,1,2,...,k}; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 5, 4, 4, 5, 15, 11, 9, 11, 15, 52, 36, 26, 26, 36, 52, 203, 135, 92, 66, 92, 135, 203, 877, 566, 371, 249, 249, 371, 566, 877, 4140, 2610, 1663, 1075, 712, 1075, 1663, 2610, 4140, 21147, 13082, 8155, 5133, 3274, 3274, 5133, 8155, 13082, 21147
Offset: 0

Views

Author

Alois P. Heinz, Jul 20 2021

Keywords

Comments

Also number A(n,k) of factorizations of Product_{i=1..n} prime(i) * Product_{i=1..k} prime(i); A(2,2) = 9: 2*2*3*3, 3*3*4, 6*6, 2*3*6, 4*9, 2*2*9, 3*12, 2*18, 36.

Examples

			A(2,2) = 9: 1122, 11|22, 12|12, 1|122, 112|2, 11|2|2, 1|1|22, 1|12|2, 1|1|2|2.
Square array A(n,k) begins:
    1,    1,    2,     5,    15,     52,     203,     877, ...
    1,    2,    4,    11,    36,    135,     566,    2610, ...
    2,    4,    9,    26,    92,    371,    1663,    8155, ...
    5,   11,   26,    66,   249,   1075,    5133,   26683, ...
   15,   36,   92,   249,   712,   3274,   16601,   91226, ...
   52,  135,  371,  1075,  3274,  10457,   56135,  325269, ...
  203,  566, 1663,  5133, 16601,  56135,  198091, 1207433, ...
  877, 2610, 8155, 26683, 91226, 325269, 1207433, 4659138, ...
  ...
		

Crossrefs

Columns (or rows) k=0-10 give: A000110, A035098, A322764, A322768, A346881, A346882, A346883, A346884, A346885, A346886, A346887.
Main diagonal gives A020555.
First upper (or lower) diagonal gives A322766.
Second upper (or lower) diagonal gives A322767.
Antidiagonal sums give A346490.
A(2n,n) gives A322769.

Programs

  • Maple
    g:= proc(n, k) option remember; uses numtheory; `if`(n>k, 0, 1)+
         `if`(isprime(n), 0, add(`if`(d>k or max(factorset(n/d))>d, 0,
            g(n/d, d)), d=divisors(n) minus {1, n}))
        end:
    p:= proc(n) option remember; `if`(n=0, 1, p(n-1)*ithprime(n)) end:
    A:= (n, k)-> g(p(n)*p(k)$2):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, 1,
          add(b(n-j)*binomial(n-1, j-1), j=1..n))
        end:
    A:= proc(n, k) option remember; `if`(n
    				
  • Mathematica
    b[n_] := b[n] = If[n == 0, 1, Sum[b[n-j] Binomial[n-1, j-1], {j, 1, n}]];
    A[n_, k_] := A[n, k] = If[n < k, A[k, n],
         If[k == 0, b[n], (A[n + 1, k - 1] + Sum[A[n - k + j, j]*
         Binomial[k - 1, j], {j, 0, k - 1}] + A[n, k - 1])/2]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Aug 18 2021, after Alois P. Heinz's second program *)

Formula

A(n,k) = A001055(A002110(n)*A002110(k)).
A(n,k) = A(k,n).
A(n,k) = A322765(abs(n-k),min(n,k)).

A322764 Number of set partitions of the multiset consisting of one copy each of x_1, x_2, ..., x_n, and 2 copies each of y_1 and y_2.

Original entry on oeis.org

9, 26, 92, 371, 1663, 8155, 43263, 246218, 1493344, 9600683, 65133513, 464538351, 3471671717, 27109690422, 220646396816, 1867649896679, 16408260807503, 149357276866099, 1406334890073883, 13677748330883790, 137221985081833892
Offset: 0

Views

Author

N. J. A. Sloane, Dec 30 2018

Keywords

Comments

The initial 9 is also A020555(2).

References

  • D. E. Knuth, The Art of Computer Programming, Vol. 4A, Table A-1, page 778.

Crossrefs

Cf. A000110 (Bell number), A020555, A322773.
Column 2 of the array in A322765.

Programs

  • PARI
    T(n, k) = if(k==0, sum(j=0, n, stirling(n, j, 2)), (T(n+2, k-1)+T(n+1, k-1)+sum(j=0, k-1, binomial(k-1, j)*T(n, j)))/2);
    vector(20, n, T(n-1, 2)) \\ Seiichi Manyama, Nov 21 2020

Formula

4*a(n) = 3*b(n) + 2*b(n+1) + 3*b(n+2) + 2*b(n+3) + b(n+4), where b(n) = A000110(n). - Seiichi Manyama, Nov 21 2020
Showing 1-8 of 8 results.