login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A305503 Largest cardinality of subsets A of {0,1,...,n-1} with |A + A| > |A - A|. 0
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,15
COMMENTS
All the possible 'A's are explicitly generated and sorted according to their cardinality.
LINKS
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-2007.
FORMULA
a(n) = n - 7 (conjectured) for all n > 15.
Conjectures from Colin Barker, Jun 01 2020: (Start)
G.f.: x^14*(9 - 9*x + x^2) / (1 - x)^2.
a(n) = 2*a(n-1) - a(n-2) for n>17.
(End)
EXAMPLE
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.
PROG
(Python)
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
CROSSREFS
Sequence in context: A282957 A282987 A118662 * A175219 A124475 A179057
KEYWORD
more,hard,nonn
AUTHOR
Tanuj Mathur, Jun 03 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 06:44 EDT 2024. Contains 371265 sequences. (Running on oeis4.)