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}).
A222808
Number of subsets A of {0,1,...,n-1} with |A+A| < |A-A|.
Original entry on oeis.org
0, 0, 0, 2, 8, 24, 62, 150, 338, 738, 1568, 3282, 6780, 13904, 28288, 57342, 115812, 233426, 469656, 944000, 1895194, 3802762, 7625328, 15284798, 30626642, 61353084, 122872144, 246042562, 492592948, 986089652, 1973756116, 3950330140, 7905541650, 15819942048, 31655323370
Offset: 1
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.
A224893
Number of subsets A of {0,...,n-1} such that A contains 0 and n-1, and |A+A| > |A-A|.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 14, 16, 42, 92, 208, 382, 834, 1748, 3568, 7066, 14914, 28618, 60712, 120872, 240102, 483328, 992812, 1948804, 3975364, 7933368, 15876692, 31759760, 64035868, 126968066, 255821994
Offset: 1
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
A327819
Elements of the unique smallest MSTD set of primes.
Original entry on oeis.org
3, 5, 7, 13, 17, 19, 23, 43, 47, 53, 59, 61, 67, 71, 73
Offset: 1
Showing 1-7 of 7 results.
Comments