login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of subsets of {-n..n} whose sum of reciprocals is 1.
1

%I #12 Dec 23 2024 02:15:51

%S 1,2,4,8,16,48,96,192,384,768,1536,5632,11264,22528,77312,154624,

%T 309248,922624,1845248,6848512,17096576,34193152,68386304,272849152

%N Number of subsets of {-n..n} whose sum of reciprocals is 1.

%C Number of ways of writing 1 as Sum_{k=-n..n, k<>0} e(k)/k, where e(k) is 0 or 1.

%F a(n) <= 2*a(n-1) since we count s and s union {-1/n, 1/n} for each subset s counted in a(n-1); equality holds for n prime (and other cases). - _Michael S. Branicky_, Dec 21 2024

%e a(3) = 4 subsets: {1}, {-3, 1, 3}, {-2, 1, 2}, {-3, -2, 1, 2, 3}.

%o (Python)

%o from functools import cache

%o from fractions import Fraction

%o @cache

%o def b(i, s):

%o if i == 0: return 1 if s == 1 else 0

%o return b(i-1, s) + b(i-1, s+Fraction(1, (-1)**(i&1)*((i+1)>>1)))

%o a = lambda n: b(2*n, 0)

%o print([a(n) for n in range(1, 11)]) # _Michael S. Branicky_, Dec 21 2024

%Y Cf. A092670.

%K nonn,more

%O 1,2

%A _Ilya Gutkovskiy_, Dec 21 2024

%E a(12)-a(24) from _Michael S. Branicky_, Dec 21 2024