login
Number of subsets of {1..n} whose product is one more than the sum of their complement.
2

%I #19 Oct 09 2019 04:48:22

%S 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,

%T 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,

%U 4,5,2,10,5,3,7,11,6,10,5,11,6,4,7,6,10

%N Number of subsets of {1..n} whose product is one more than the sum of their complement.

%C Also by definition the number of subsets whose sum is one fewer than the product of their complement.

%H Giovanni Resta, <a href="/A325538/b325538.txt">Table of n, a(n) for n = 0..2500</a>

%e The initial terms count the following subsets:

%e 0: {}

%e 1: {1}

%e 2: {2}

%e 3: {1,3}

%e 4: {2,3}

%e 7: {4,5}

%e 10: {1,6,7}

%e 12: {7,9}

%e 12: {1,2,4,8}

%e 14: {2,5,9}

%e 14: {1,2,4,11}

%e 15: {1,3,5,7}

%e 16: {3,4,10}

%e 16: {1,3,5,8}

%e 17: {1,10,13}

%e 18: {2,5,15}

%e 19: {11,15}

%e 19: {1,2,6,14}

%e 20: {1,4,6,8}

%t Table[Length[Select[Subsets[Range[n]],1+Plus@@#==Times@@Complement[Range[n],#]&]],{n,0,10}]

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

%Y Cf. A028422, A053632, A059529, A063865, A178830, A301987, A325041, A326172, A326173, A326174, A326175, A326179, A326180, A326441.

%K nonn

%O 0,13

%A _Gus Wiseman_, Jul 07 2019

%E More terms from _Alois P. Heinz_, Jul 12 2019