The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A366130 Number of subsets of {1..n} with a subset summing to n + 1. 4

%I #17 Nov 24 2023 12:38:05

%S 0,0,1,2,7,15,38,79,184,378,823,1682,3552,7208,14948,30154,61698,

%T 124302,252125,506521,1022768,2051555,4127633,8272147,16607469,

%U 33258510,66680774,133467385,267349211,535007304,1071020315,2142778192,4288207796

%N Number of subsets of {1..n} with a subset summing to n + 1.

%F Diagonal k = n + 1 of A365381.

%e The subset S = {1,2,4} has subset {1,4} with sum 4+1 and {2,4} with sum 5+1 and {1,2,4} with sum 6+1, so S is counted under a(4), a(5), and a(6).

%e The a(0) = 0 through a(5) = 15 subsets:

%e . . {1,2} {1,3} {1,4} {1,5}

%e {1,2,3} {2,3} {2,4}

%e {1,2,3} {1,2,3}

%e {1,2,4} {1,2,4}

%e {1,3,4} {1,2,5}

%e {2,3,4} {1,3,5}

%e {1,2,3,4} {1,4,5}

%e {2,3,4}

%e {2,4,5}

%e {1,2,3,4}

%e {1,2,3,5}

%e {1,2,4,5}

%e {1,3,4,5}

%e {2,3,4,5}

%e {1,2,3,4,5}

%t Table[Length[Select[Subsets[Range[n]],MemberQ[Total/@Subsets[#],n+1]&]],{n,0,10}]

%o (Python)

%o from itertools import combinations

%o from sympy.utilities.iterables import partitions

%o def A366130(n):

%o a = tuple(set(p.keys()) for p in partitions(n+1,k=n) if max(p.values(),default=0)==1)

%o return sum(1 for k in range(2,n+1) for w in (set(d) for d in combinations(range(1,n+1),k)) if any(s<=w for s in a)) # _Chai Wah Wu_, Nov 24 2023

%Y For pairs summing to n + 1 we have A167762, complement A038754.

%Y For n instead of n + 1 we have A365376, for pairs summing to n A365544.

%Y The complement is counted by A365377 shifted.

%Y The complement for pairs summing to n is counted by A365377.

%Y A068911 counts subsets of {1..n} w/o two distinct elements summing to n.

%Y A093971/A088809/A364534 count certain types of sum-full subsets.

%Y Cf. A004526, A004737, A008967, A046663, A238628, A365381, A365541.

%K nonn,more

%O 0,4

%A _Gus Wiseman_, Oct 07 2023

%E a(20)-a(32) from _Chai Wah Wu_, Nov 24 2023

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 11:58 EDT 2024. Contains 372532 sequences. (Running on oeis4.)