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!)
A260873 Lexicographically first sequence of positive integers, every nonempty subset of which has a distinct mean. 1
1, 2, 4, 8, 16, 32, 104, 321, 1010, 3056, 9477, 29437, 91060, 286574, 919633, 2967499, 10043936, 40000426 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
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?
LINKS
Manfred Scheucher, Sage Script
Manfred Scheucher, Sage Script#2
EXAMPLE
{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.
PROG
(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
CROSSREFS
Cf. A259544.
Sequence in context: A264656 A078227 A250073 * A138814 A233424 A137181
KEYWORD
nonn,more,hard
AUTHOR
Jon E. Schoenfield, Aug 01 2015
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
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 April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)