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.
%I A260873 #36 Aug 22 2023 17:38:49 %S A260873 1,2,4,8,16,32,104,321,1010,3056,9477,29437,91060,286574,919633, %T A260873 2967499,10043936,40000426 %N A260873 Lexicographically first sequence of positive integers, every nonempty subset of which has a distinct mean. %C A260873 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? %H A260873 Manfred Scheucher, <a href="/A260873/a260873.sage.txt">Sage Script</a> %H A260873 Manfred Scheucher, <a href="/A260873/a260873_1.sage.txt">Sage Script#2</a> %e A260873 {1} has only 1 nonempty subset, {1}; its mean is 1. %e A260873 {1,2} has 3 nonempty subsets, {1}, {2}, and {1,2}; their means are 1, 2, and 3/2, respectively. %e A260873 {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. %e A260873 {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. %e A260873 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. %e A260873 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. %o A260873 (Python) %o A260873 from copy import copy %o A260873 from fractions import Fraction %o A260873 from itertools import chain, combinations %o A260873 def powerset(s): %o A260873 return chain.from_iterable(combinations(s, r) for r in range(len(s)+1)) %o A260873 def distinct_means(means, lst, t): %o A260873 newmeans = copy(means) %o A260873 for subset in powerset(lst): %o A260873 sm = Fraction(t+sum(subset), len(subset)+1) %o A260873 if sm in newmeans: return False, means %o A260873 else: newmeans.add(sm) %o A260873 return True, newmeans %o A260873 def aupto(n): %o A260873 largest = 0 %o A260873 alst = [] %o A260873 prevmeans = set() %o A260873 for k in range(n): %o A260873 t = largest + 1 %o A260873 passes, means = distinct_means(prevmeans, alst, t) %o A260873 while not passes: %o A260873 t += 1 %o A260873 passes, means = distinct_means(prevmeans, alst, t) %o A260873 alst.append(t) %o A260873 largest = t %o A260873 prevmeans = means %o A260873 return alst %o A260873 print(aupto(10)) # _Michael S. Branicky_, Jan 02 2021 %Y A260873 Cf. A259544. %K A260873 nonn,more,hard %O A260873 1,2 %A A260873 _Jon E. Schoenfield_, Aug 01 2015 %E A260873 a(11)-a(13) from _Manfred Scheucher_, Aug 04 2015 %E A260873 a(14)-a(15) from _Manfred Scheucher_, Aug 09 2015 %E A260873 a(16)-a(17) from _Michael S. Branicky_, Aug 05 2023 %E A260873 a(18) from _Michael S. Branicky_, Aug 22 2023