login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A178165 Number of unordered collections of distinct nonempty subsets of an n-element set where each element appears in at most 2 subsets. 4
1, 2, 8, 59, 652, 9736, 186478, 4421018, 126317785, 4260664251, 166884941780, 7489637988545, 380861594219460, 21739310882945458, 1381634777325000263, 97089956842985393297, 7497783115765911443879, 632884743974716421132084 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

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.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..300

FORMULA

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

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 *)

PROG

(Python)

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))

CROSSREFS

Row n=2 of A330964.

Cf. A094574, A000110, A002718, A178171, A178173.

Sequence in context: A162065 A241329 A346065 * A214872 A197937 A205076

Adjacent sequences:  A178162 A178163 A178164 * A178166 A178167 A178168

KEYWORD

nonn

AUTHOR

Daniel E. Loeb, Dec 16 2010

EXTENSIONS

Edited and corrected by Max Alekseyev, Dec 19 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 4 11:01 EDT 2021. Contains 346447 sequences. (Running on oeis4.)