A222807
Number of subsets A of {0,1,...,n-1} with |A+A| > |A-A|.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 10, 30, 66, 144, 314, 692, 1452, 3046, 6388, 13298, 27274, 56164, 113672, 231892, 470984, 950178, 1912700, 3868034, 7772172, 15651674, 31464544, 63154106, 126603428, 254088618, 508541874, 1018817124
Offset: 1
The four examples illustrating a(15)=4 are (cf. A140794):
0 2 3 7 10 11 12 14,
0 2 3 4 7 11 12 14,
0 1 2 5 9 10 12 13 14,
0 1 2 4 5 9 12 13 14.
A118544
Number of subsets A of {1,2,...,n} with |A+A| = |A-A|.
Original entry on oeis.org
2, 4, 8, 14, 24, 40, 66, 106, 174, 286, 480, 814, 1412, 2480, 4476, 8184, 15230, 28652, 54488, 104262, 201266, 390090, 760234, 1486030, 2914492, 5728506, 11289420, 22279222, 44046072, 87181188, 172777354, 342724456, 680524908, 1352154964, 2688763324
Offset: 1
a(4)=14: two of the sixteen subsets of {1,2,3,4} have |A+A|<|A-A| (specifically, {1,3,4} and {1,2,4}).
A140794
One of the four smallest counterexamples to the conjecture that the cardinality of the sumset is less than or equal to the cardinality of the difference set of every finite set of integers.
Original entry on oeis.org
0, 2, 3, 7, 10, 11, 12, 14
Offset: 1
Let A = {0, 2, 3, 7, 10, 11, 12, 14}. Then the cardinality of the sumset, |A + A| = 26, while the cardinality of the difference set, |A - A| = 25.
- P. V. Hegarty, Some explicit constructions of sets with more sums than differences, Acta Arith., 130 (2007), 61-77.
- Greg Martin and Kevin O'Bryant, Many sets have more sums than differences, arXiv:math/0608131 [math.NT], 2006.
- Melvyn B. Nathanson, Problems in Additive Number Theory, III: Thematic Seminars at the Centre de Recerca Matematica, arXiv:0807.2073 [math.NT], 2008.
A102282
Smallest possible example of an MSTD ("More sums than differences") set.
Original entry on oeis.org
0, 2, 3, 4, 7, 11, 12, 14
Offset: 1
- B. Hayes, Calculemus!, American Scientist, 96 (Sep-Oct 2008), 362-366.
A305503
Largest cardinality of subsets A of {0,1,...,n-1} with |A + A| > |A - A|.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40
Offset: 1
For n = 15, the subsets A of {0,1,...,n-1} with |A + A| > |A - A| are (0, 2, 3, 4, 7, 11, 12, 14); (0, 2, 3, 7, 10, 11, 12, 14); (0, 1, 2, 4, 5, 9, 12, 13, 14) and (0, 1, 2, 5, 9, 10, 12, 13, 14). So, the largest cardinality is 9.
-
import numpy as np
import itertools
def findsubsets(S, m):
return itertools.combinations(S, m)
def mstd(a):
a1 = set()
a2 = set()
for i in a:
for j in a:
a1.add(i + j)
a2.add(i - j)
return len(a1) > len(a2)
def a(n):
ans = 0
Nn = list(range(n))
for k in range(1, n):
if any(mstd(i) for i in findsubsets(Nn, k)):
ans = k
return ans
Showing 1-5 of 5 results.
Comments