login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238686 Number of compositions c of n such that no three points (i,c_i), (j,c_j), (k,c_k) are collinear, where c_i denotes the i-th part. 5
1, 1, 2, 3, 7, 11, 19, 30, 53, 87, 148, 219, 365, 555, 884, 1379, 2098, 3152, 4865, 7051, 10884, 15681, 23637, 34062, 50336, 72425, 105738, 149781, 217625, 308859, 440889, 623823, 885116, 1241075, 1744784, 2433371, 3401728, 4719635, 6548306, 9035003, 12472106 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Joerg Arndt and Alois P. Heinz, Table of n, a(n) for n = 0..50

EXAMPLE

There are a(6) = 19 such compositions of 6: [6], [5,1], [4,2], [3,3], [2,4], [1,5], [4,1,1], [2,3,1], [1,4,1], [1,3,2], [3,1,2], [2,1,3], [1,1,4], [2,2,1,1], [1,2,2,1], [2,1,2,1], [1,2,1,2], [2,1,1,2], [1,1,2,2].

MAPLE

b:= proc(n, l) local j, k, m; m:= nops(l);

      for j to m-2 do for k from j+1 to m-1 do

        if (l[m]-l[k])*(k-j)=(l[k]-l[j])*(m-k)

          then return 0 fi od od;

     `if`(n=0, 1, add(b(n-i, [l[], i]), i=1..n))

    end:

a:= n-> b(n, []):

seq(a(n), n=0..20);

MATHEMATICA

b[n_, l_] := Module[{j, k, m = Length[l]}, For[ j = 1, j <= m - 2, j++, For[k = j+1, k <= m - 1 , k++, If[(l[[m]] - l[[k]])*(k - j) == (l[[k]] - l[[j]])*(m - k), Return[0]]]]; If[n == 0, 1, Sum[b[n - i,  Append[l, i]], {i, 1, n}]]];

a[n_] := b[n, {}];

Table[a[n], {n, 0, 20}] (* Jean-Fran├žois Alcover, May 21 2018, translated from Maple *)

CROSSREFS

Cf. A238687 (the same for partitions).

Cf. A238423, A238432, A238569.

Sequence in context: A232232 A232233 A062576 * A079739 A210394 A211203

Adjacent sequences:  A238683 A238684 A238685 * A238687 A238688 A238689

KEYWORD

nonn

AUTHOR

Joerg Arndt and Alois P. Heinz, Mar 02 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 29 10:05 EDT 2020. Contains 334699 sequences. (Running on oeis4.)