A365042 Number of subsets of {1..n} containing n such that some element can be written as a positive linear combination of the others.
0, 0, 1, 2, 4, 5, 9, 11, 17, 21, 29, 36, 50, 60, 78, 95, 123, 147, 185, 221, 274, 325, 399, 472, 574, 672, 810, 945, 1131, 1316, 1557, 1812, 2137, 2462, 2892, 3322, 3881, 4460, 5176, 5916, 6846, 7817, 8993, 10250, 11765, 13333, 15280, 17308, 19731, 22306
Offset: 0
Keywords
Examples
The subset {3,4,10} has 10 = 2*3 + 1*4 so is counted under a(10). The a(0) = 0 through a(7) = 11 subsets: . . {1,2} {1,3} {1,4} {1,5} {1,6} {1,7} {1,2,3} {2,4} {1,2,5} {2,6} {1,2,7} {1,2,4} {1,3,5} {3,6} {1,3,7} {1,3,4} {1,4,5} {1,2,6} {1,4,7} {2,3,5} {1,3,6} {1,5,7} {1,4,6} {1,6,7} {1,5,6} {2,3,7} {2,4,6} {2,5,7} {1,2,3,6} {3,4,7} {1,2,3,7} {1,2,4,7}
Links
- Steven R. Finch, Monoids of natural numbers, March 17, 2009.
Crossrefs
Programs
-
Mathematica
combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]]; Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Or@@Table[combp[#[[k]],Union[Delete[#,k]]]!={},{k,Length[#]}]&]],{n,0,10}]
Formula
a(n) = A088314(n) - 1.
Comments