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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A143823 Number of subsets {x(1),x(2),...,x(k)} of {1,2,...,n} such that all differences |x(i)-x(j)| are distinct. 10
1, 2, 4, 7, 13, 22, 36, 57, 91, 140, 216, 317, 463, 668, 962, 1359, 1919, 2666, 3694, 5035, 6845, 9188, 12366, 16417, 21787, 28708, 37722, 49083, 63921, 82640, 106722, 136675, 174895, 222558, 283108, 357727, 451575, 567536, 712856, 890405, 1112081, 1382416, 1717540 (list; graph; refs; listen; history; internal format)
OFFSET

0,2

COMMENTS

See A143824 for sizes of the largest subsets of {1,2,...,n} with the desired property.

a(n) = A169947(n-1) + n + 1 for n>=2.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..60

EXAMPLE

{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, so {1,2,4} is counted as one of the 13 subsets of {1,2,3,4} with the desired property.  Only 2^4-13=3 subsets of {1,2,3,4} do not have this property: {1,2,3}, {2,3,4}, {1,2,3,4}.

MAPLE

b:= proc(n, s) local sn, m;

      if n<1 then 1

    else sn:= [s[], n];

         m:= nops(sn);

         `if` (m*(m-1)/2 = nops (({seq (seq (sn[i]-sn[j],

           j=i+1..m), i=1..m-1)})), b(n-1, sn), 0) +b(n-1, s)

      fi

    end:

a:= proc(n) option remember;

       b(n-1, [n]) +`if` (n=0, 0, a(n-1))

    end:

seq (a(n), n=0..30); # Alois P. Heinz, Sep 14 2011

CROSSREFS

Cf. A143824.

Sequence in context: A061257 A061255 A088111 * A119983 A151897 A192758

Adjacent sequences:  A143820 A143821 A143822 * A143824 A143825 A143826

KEYWORD

nonn

AUTHOR

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

EXTENSIONS

a(21)-a(29) and connection to A169947 from Nathaniel Johnston (nathaniel(AT)nathanieljohnston.com), Nov 12 2010

Corrected a(21)-a(29) and more terms 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 15 15:20 EST 2012. Contains 205823 sequences.