cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A260873 Lexicographically first sequence of positive integers, every nonempty subset of which has a distinct mean.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 104, 321, 1010, 3056, 9477, 29437, 91060, 286574, 919633, 2967499, 10043936, 40000426
Offset: 1

Views

Author

Jon E. Schoenfield, Aug 01 2015

Keywords

Comments

The seeming pattern a(n) = 2^(n-1) is broken at a(7)=104. Can the value of lim_{n->inf.} a(n)/a(n-1) be determined?

Examples

			{1} has only 1 nonempty subset, {1}; its mean is 1.
{1,2} has 3 nonempty subsets, {1}, {2}, and {1,2}; their means are 1, 2, and 3/2, respectively.
{1,2,3} has 7 nonempty subsets, not all of which have distinct means: {2}, {1,3}, and {1,2,3} all have a mean of 2. Therefore, a(3) > 3.
{1,2,4} has 7 nonempty subsets, {1}, {2}, {4}, {1,2}, {1,4}, {2,4} and {1,2,4}, all of which have distinct means, so a(3)=4.
For the set {1,2,4,5}, the subsets {1,5} and {2,4} have the same mean; for {1,2,4,6}, {4} and {2,6} have the same mean; and for {1,2,4,7}, {4} and {1,7} have the same mean; but all nonempty subsets of {1,2,4,8} are distinct, so a(4)=8.
For each k in 9 <= k <= 15, there are at least two subsets of {1,2,4,8,k} having the same mean, but all nonempty subsets of {1,2,4,8,16} have distinct means, so a(5)=16.
		

Crossrefs

Cf. A259544.

Programs

  • Python
    from copy import copy
    from fractions import Fraction
    from itertools import chain, combinations
    def powerset(s):
      return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))
    def distinct_means(means, lst, t):
      newmeans = copy(means)
      for subset in powerset(lst):
        sm = Fraction(t+sum(subset), len(subset)+1)
        if sm in newmeans: return False, means
        else: newmeans.add(sm)
      return True, newmeans
    def aupto(n):
      largest = 0
      alst = []
      prevmeans = set()
      for k in range(n):
        t = largest + 1
        passes, means = distinct_means(prevmeans, alst, t)
        while not passes:
          t += 1
          passes, means = distinct_means(prevmeans, alst, t)
        alst.append(t)
        largest = t
        prevmeans = means
      return alst
    print(aupto(10)) # Michael S. Branicky, Jan 02 2021

Extensions

a(11)-a(13) from Manfred Scheucher, Aug 04 2015
a(14)-a(15) from Manfred Scheucher, Aug 09 2015
a(16)-a(17) from Michael S. Branicky, Aug 05 2023
a(18) from Michael S. Branicky, Aug 22 2023

A259545 Minimum number k such that, for every m >= k, there exists a set of n positive integers whose largest element is m and whose subsets all have distinct arithmetic means.

Original entry on oeis.org

1, 2, 4, 7, 16, 34, 78, 178
Offset: 1

Views

Author

Javier Múgica, Jun 30 2015

Keywords

Comments

Let a set of integers be called "of different average" if it satisfies that the arithmetic mean of any two different subsets of it is different (the empty set ignored). E.g., the set {1,2,5} is of different average because 1 != 2 != 5 != (1+2)/2 != (1+5)/2 != (2+5)/2 != (1+2+5)/3.
In order for a set to be of different average it is obvious that all its elements have to be different. Also, if a set is of different average and a constant k is added to all the terms, the resulting set will also be of different average. Because of this, in order to study such sets it is convenient to select an arbitrary first element, say 1. We have by definition a(n)>=A259544(n).
If we already have a different average sequence of (n-1) terms: 1
But a much better upper bound can be found by considering the upper bound for A259544(n-1). This is 4^(n-2), and indeed the bound 4^(k-1), for 1<=k<=n-1, applies to all the terms of the sequence. Therefore a different average sequence of n-1 elements exists in which 1=a_1=4^0, a_2<4^1, a3<4_2, etc., until a_(n-1)<4^(n-2). We see that, for this sequence, condition (ii) is more restrictive than (i), in the worst possible scenario for both, and it provides the bound: a(n) < (n-1)4^(n-1)/3, n>=3.
Conjecture: a(n)=A259544(n) only for a finite number of n. Supposing this to be true, what is the order of growth of a(n)-A259544(n)?
Conjecture: lim_{n->inf} a(n)/A259544(n)=1, and indeed the bound <4^(n-1), n>1, is also valid for a(n).
Conjecture: a(n) < A259544(n+1). (This seems obvious, but lacks a proof.)

Crossrefs

Cf. A259544.
Showing 1-2 of 2 results.