login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A143824 Size of the largest subset {x(1),x(2),...,x(k)} of {1,2,...,n} with the property that all differences |x(i)-x(j)| are distinct. 1
0, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10 (list; graph; refs; listen; history; internal format)
OFFSET

0,3

COMMENTS

See A143823 for the number of subsets of {1,2,...,n} with the required property.

Can be formulated as an integer linear program: maximize sum {i = 1 to n} z[i] subject to z[i] + z[j] - 1 <= y[i,j] for all i < j, sum {i = 1 to n - d} y[i,i+d] <= 1 for d = 1 to n - 1, z[i] in {0,1} for all i, y[i,j] in {0,1} for all i < j. [From Rob Pratt (Rob.Pratt(AT)sas.com), Feb 09 2010]

EXAMPLE

For n=4, {1,2,4} is a subset of {1,2,3,4} with distinct differences 2-1=1, 4-1=3, 4-2=2 between pairs of elements and no larger set has the required property; so a(4)=3.

CROSSREFS

Cf. A143823.

Sequence in context: A095791 A036042 A162988 * A034463 A071996 A072747

Adjacent sequences:  A143821 A143822 A143823 * A143825 A143826 A143827

KEYWORD

nonn

AUTHOR

John W. Layman (layman(AT)math.vt.edu), Sep 02 2008

EXTENSIONS

More terms from Rob Pratt (Rob.Pratt(AT)sas.com), Feb 09 2010

a(41)-a(60) from Alois P. Heinz (heinz(AT)hs-heilbronn.de), Sep 14 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 01:56 EST 2012. Contains 205860 sequences.