A325538 Number of subsets of {1..n} whose product is one more than the sum of their complement.
1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 2, 0, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 0, 4, 2, 2, 4, 2, 2, 5, 5, 1, 2, 2, 3, 2, 5, 3, 4, 2, 2, 3, 10, 2, 4, 7, 5, 3, 3, 7, 6, 4, 4, 5, 5, 5, 2, 6, 4, 6, 5, 3, 8, 4, 5, 4, 5, 2, 10, 5, 3, 7, 11, 6, 10, 5, 11, 6, 4, 7, 6, 10
Offset: 0
Keywords
Examples
The initial terms count the following subsets: 0: {} 1: {1} 2: {2} 3: {1,3} 4: {2,3} 7: {4,5} 10: {1,6,7} 12: {7,9} 12: {1,2,4,8} 14: {2,5,9} 14: {1,2,4,11} 15: {1,3,5,7} 16: {3,4,10} 16: {1,3,5,8} 17: {1,10,13} 18: {2,5,15} 19: {11,15} 19: {1,2,6,14} 20: {1,4,6,8}
Links
- Giovanni Resta, Table of n, a(n) for n = 0..2500
Crossrefs
Programs
-
Mathematica
Table[Length[Select[Subsets[Range[n]],1+Plus@@#==Times@@Complement[Range[n],#]&]],{n,0,10}] ric[n_, pr_, s_, lst_, t_] := Block[{k}, If[pr == t-s, cnt++]; Do[ If[pr k <= t, ric[n, pr k, s + k, k, t], Break[]], {k, lst+1, n}]]; a[n_] := (cnt = 0; ric[n, 1, 0, 0, n (n + 1)/2 + 1]; cnt); a /@ Range[0, 85] (* Giovanni Resta, Sep 13 2019 *)
Extensions
More terms from Alois P. Heinz, Jul 12 2019
Comments