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

A188445 T(n,k) is the number of (n*k) X k binary arrays with nonzero rows in decreasing order and n ones in every column.

Original entry on oeis.org

1, 2, 0, 5, 1, 0, 15, 8, 0, 0, 52, 80, 5, 0, 0, 203, 1088, 205, 1, 0, 0, 877, 19232, 11301, 278, 0, 0, 0, 4140, 424400, 904580, 67198, 205, 0, 0, 0, 21147, 11361786, 101173251, 24537905, 250735, 80, 0, 0, 0, 115975, 361058000, 15207243828, 13744869502
Offset: 1

Views

Author

R. H. Hardin, Mar 31 2011

Keywords

Examples

			Array begins:
============================================================================
n\k| 1 2 3   4       5          6             7              8             9
---+------------------------------------------------------------------------
1  | 1 2 5  15      52        203           877           4140         21147
2  | 0 1 8  80    1088      19232        424400       11361786     361058000
3  | 0 0 5 205   11301     904580     101173251    15207243828 2975725761202
4  | 0 0 1 278   67198   24537905   13744869502 11385203921707 ...
5  | 0 0 0 205  250735  425677958 1184910460297 ...
6  | 0 0 0  80  621348 5064948309 ...
7  | 0 0 0  15 1058139 ...
8  | 0 0 0   1 ...
...
Some solutions for 16 X 4:
  1 1 1 0    1 1 1 1    1 1 1 1    1 1 1 0    1 1 1 1
  1 0 1 1    1 1 0 1    1 1 0 0    1 0 1 1    1 1 0 0
  1 0 1 0    1 0 1 1    1 0 1 1    1 0 0 1    1 0 1 1
  1 0 0 1    1 0 0 0    1 0 0 0    1 0 0 0    1 0 0 0
  0 1 1 1    0 1 1 0    0 1 1 1    0 1 1 0    0 1 1 1
  0 1 0 1    0 1 0 0    0 1 0 0    0 1 0 1    0 1 0 0
  0 1 0 0    0 0 1 1    0 0 1 1    0 1 0 0    0 0 1 0
  0 0 0 0    0 0 0 0    0 0 0 0    0 0 1 1    0 0 0 1
  0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0
  0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0
  0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0
  0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0
  0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0
  0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0
  0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0
  0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0    0 0 0 0
		

Crossrefs

Columns 5..6 are A331127, A331129.
Column sums are A319190.

Programs

  • PARI
    WeighT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, (-1)^(n-1)/n))))-1, -#v)}
    D(p, n, k)={my(v=vector(n)); for(i=1, #p, v[p[i]]++); WeighT(v)[n]^k/prod(i=1, #v, i^v[i]*v[i]!)}
    T(n, k)={my(m=n*k+1, q=Vec(exp(intformal(O(x^m) - x^n/(1-x)))/(1+x))); if(n==0, 1, (-1)^m*sum(j=0, m, my(s=0); forpart(p=j, s+=(-1)^#p*D(p, n, k), [1, n]); s*q[#q-j])/2)} \\ Andrew Howroyd, Dec 16 2018

Formula

A(n,k) = 0 for n > 2^(k-1). - Andrew Howroyd, Jan 24 2020

A331039 Array read by antidiagonals: A(n,k) is the number of T_0 n-regular set-systems on a k-set.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 5, 0, 0, 1, 0, 1, 43, 5, 0, 0, 1, 0, 1, 518, 175, 1, 0, 0, 1, 0, 1, 8186, 9426, 272, 0, 0, 0, 1, 0, 1, 163356, 751365, 64453, 205, 0, 0, 0, 1, 0, 1, 3988342, 84012191, 23553340, 248685, 80, 0, 0, 0, 1
Offset: 0

Views

Author

Andrew Howroyd, Jan 08 2020

Keywords

Comments

An n-regular set-system is a finite set of nonempty sets in which each element appears in n blocks.
A set-system is T_0 if for every two distinct elements there exists a block containing one but not the other element.
A(n,k) is the number of binary matrices with k distinct columns and any number of distinct nonzero rows with n ones in every column and rows in decreasing lexicographic order.

Examples

			Array begins:
==========================================================
n\k | 0 1 2 3   4       5           6                7
----+-----------------------------------------------------
  0 | 1 1 0 0   0       0           0                0 ...
  1 | 1 1 1 1   1       1           1                1 ...
  2 | 1 0 1 5  43     518        8186           163356 ...
  3 | 1 0 0 5 175    9426      751365         84012191 ...
  4 | 1 0 0 1 272   64453    23553340      13241130441 ...
  5 | 1 0 0 0 205  248685   421934358    1176014951129 ...
  6 | 1 0 0 0  80  620548  5055634889   69754280936418 ...
  7 | 1 0 0 0  15 1057989 43402628681 2972156676325398 ...
  ...
The A(2,3) = 5 matrices are:
  [1 1 1]    [1 1 0]    [1 1 0]    [1 0 1]    [1 1 0]
  [1 0 0]    [1 0 1]    [1 0 0]    [1 0 0]    [1 0 1]
  [0 1 0]    [0 1 0]    [0 1 1]    [0 1 1]    [0 1 1]
  [0 0 1]    [0 0 1]    [0 0 1]    [0 1 0]
The corresponding set-systems are:
  {{1,2,3}, {1}, {2}, {3}},
  {{1,2}, {1,3}, {2,3}},
  {{1,2}, {1,3}, {2}, {3}},
  {{1,2}, {1}, {2,3}, {3}},
  {{1,3}, {1}, {2,3}, {2}}.
		

Crossrefs

Programs

  • PARI
    WeighT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, (-1)^(n-1)/n))))-1, -#v)}
    D(p, n, k)={my(v=vector(n)); for(i=1, #p, v[p[i]]++); binomial(WeighT(v)[n], k)*k!/prod(i=1, #v, i^v[i]*v[i]!)}
    T(n, k)={my(m=n*k+1, q=Vec(exp(intformal(O(x^m) - x^n/(1-x)))/(1+x))); if(n==0, k<=1, (-1)^m*sum(j=0, m, my(s=0); forpart(p=j, s+=(-1)^#p*D(p, n, k), [1, n]); s*q[#q-j])/2)}

Formula

A(n, k) = Sum_{j=1..k} Stirling1(k, j)*A188445(n, j) for n, k >= 1.
A(n, k) = 0 for k >= 1, n > 2^(k-1).
A331654(n) = Sum_{d|n} A(n/d, d).

A178165 Number of unordered collections of distinct nonempty subsets of an n-element set where each element appears in at most 2 subsets.

Original entry on oeis.org

1, 2, 8, 59, 652, 9736, 186478, 4421018, 126317785, 4260664251, 166884941780, 7489637988545, 380861594219460, 21739310882945458, 1381634777325000263, 97089956842985393297, 7497783115765911443879, 632884743974716421132084
Offset: 0

Views

Author

Daniel E. Loeb, Dec 16 2010

Keywords

Comments

If each element must appear in exactly 1 subset, then we get the Bell numbers A000110.
If each element must appear in exactly 2 subsets, then we get A002718.

Crossrefs

Programs

  • Mathematica
    terms = m = 30;
    a094577[n_] := Sum[Binomial[n, k]*BellB[2n-k], {k, 0, n}];
    egf = Exp[(1 - Exp[x])/2]*Sum[a094577[n]*(x/2)^n/n!, {n, 0, m}] + O[x]^m;
    A094574 = CoefficientList[egf + O[x]^m, x]*Range[0, m-1]!;
    a[n_] := Sum[Binomial[n, k]*A094574[[k+1]], {k, 0, n}];
    Table[a[n], {n, 0, m-1}] (* Jean-François Alcover, May 24 2019 *)
  • Python
    from numpy import array
    def toBinary(n, k):
        ans=[]
        for i in range(k):
            ans.insert(0, n%2)
            n=n>>1
        return array(ans)
    def powerSet(k): return [toBinary(n,k) for n in range(1,2**k)]
    def courcelle(maxUses, remainingSets, exact=False):
        if exact and not all(maxUses<=sum(remainingSets)): ans=0
        elif len(remainingSets)==0: ans=1
        else:
            set0=remainingSets[0]
            if all(set0<=maxUses): ans=courcelle(maxUses-set0,remainingSets[1:],exact=exact)
            else: ans=0
            ans+=courcelle(maxUses,remainingSets[1:],exact=exact)
        return ans
    for i in range(10):
        print(i, courcelle(array([2]*i),powerSet(i),exact=False))

Formula

Binomial transform of A094574: a(n) = Sum_{k=0..n} C(n,k)*A094574(k).

Extensions

Edited and corrected by Max Alekseyev, Dec 19 2010

A178171 Number of collections of nonempty subsets of an n-element set where each element appears in at most 3 subsets.

Original entry on oeis.org

1, 2, 8, 109, 3623, 200522, 16514461, 1912959395, 298569495981, 60701549078701, 15647889334180500, 5003666238486522124, 1948975409748003520112, 910680909359710587298621, 503845222094502583681150340, 326363222435413478204610417626, 245078255691857705139839897934085
Offset: 0

Views

Author

Daniel E. Loeb, Dec 17 2010

Keywords

Crossrefs

Row n=3 of A330964.
At most 1 subset gives Bell numbers A000110, at most 2 subsets gives A178165.

Extensions

a(7)-a(8) from Bert Dobbelaere, Sep 10 2019
Terms a(9) and beyond from Andrew Howroyd, Jan 04 2020

A178173 Number of collections of nonempty subsets of an n-element set where each element appears in at most 4 subsets.

Original entry on oeis.org

1, 2, 8, 128, 11087, 2232875, 775098224, 428188962261, 355916994389700, 425272149099677521, 703909738878615927739, 1565842283246869237505246, 4565002967677134523844716754, 17076464900445281560851997140670, 80494979734877344662882495100752511
Offset: 0

Views

Author

Daniel E. Loeb, Dec 17 2010

Keywords

Crossrefs

Row n=4 of A330964.
Replacing limit of 2 with a limit of 1 gives the Bell numbers A000110, limit of 2 gives A178165, limit of 3 gives A178171.

Programs

  • PARI
    \\ See A330964 for efficient code to compute this sequence. - Andrew Howroyd, Jan 04 2020
  • Python
    from numpy import array
    def toBinary(n,k):
        ans=[]
        for i in range(k):
            ans.insert(0,n%2)
            n=n>>1
        return array(ans)
    def powerSet(k): return [toBinary(n,k) for n in range(1,2**k)]
    def courcelle(maxUses,remainingSets,exact=False):
        if exact and not all(maxUses<=sum(remainingSets)): ans=0
        elif len(remainingSets)==0: ans=1
        else:
            set0=remainingSets[0]
            if all(set0<=maxUses): ans=courcelle(maxUses-set0,remainingSets[1:],exact=exact)
            else: ans=0
            ans+=courcelle(maxUses,remainingSets[1:],exact=exact)
        return ans
    for i in range(10):
        print(i, courcelle(array([4]*i),powerSet(i),exact=False))
    

Extensions

a(6)-a(8) from Bert Dobbelaere, Sep 10 2019
Terms a(9) and beyond from Andrew Howroyd, Jan 04 2020

A374573 Number of sets of nonempty subsets of [n] where each element appears in at most n subsets.

Original entry on oeis.org

1, 2, 8, 109, 11087, 15312665, 422059040480, 312210595377427422, 7962423724145466121172404, 8668986293188852191645897272339367
Offset: 0

Views

Author

Alois P. Heinz, Jul 11 2024

Keywords

Examples

			a(0) = 1: {}.
a(1) = 2: {}, {{1}}.
a(2) = 8: {}, {{1}}, {{2}}, {{1,2}}, {{1},{2}}, {{1},{1,2}}, {{2},{1,2}}, {{1},{2},{1,2}}.
		

Crossrefs

Main diagonal of A330964.

Formula

a(n) = A330964(n,n).
Showing 1-6 of 6 results.