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!)
A238687 Number of partitions p of n such that no three points (i,p_i), (j,p_j), (k,p_k) are collinear, where p_i denotes the i-th part. 6

%I #20 Feb 09 2021 02:05:31

%S 1,1,2,2,4,5,6,8,13,10,18,21,27,29,41,41,62,65,77,91,114,127,151,173,

%T 213,232,279,322,372,410,491,518,630,724,814,894,1057,1141,1326,1502,

%U 1681,1839,2146,2324,2636,2966,3272,3607,4173,4422,5035,5616,6195,6703

%N Number of partitions p of n such that no three points (i,p_i), (j,p_j), (k,p_k) are collinear, where p_i denotes the i-th part.

%H Fausto A. C. Cariboni, <a href="/A238687/b238687.txt">Table of n, a(n) for n = 0..300</a> (terms 0..150 from Alois P. Heinz)

%e There are a(10) = 18 such partitions of 10: [6,2,1,1], [5,2,2,1], [4,4,1,1], [3,3,2,2], [8,1,1], [7,2,1], [6,3,1], [6,2,2], [5,4,1], [5,3,2], [4,4,2], [4,3,3], [9,1], [8,2], [7,3], [6,4], [5,5], [10].

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

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

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

%p then return 0 fi od od;

%p `if`(n=0, 1, `if`(i<1, 0, b(n, i-1, l)+

%p `if`(i>n, 0, b(n-i, i, [l[], i]))))

%p end:

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

%p seq(a(n), n=0..40);

%t b[n_, i_, 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, If[i < 1, 0, b[n, i - 1, l] + If[i > n, 0, b[n - i, i, Append[l, i]]]]]];

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

%t Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, May 21 2018, translated from Maple *)

%Y Cf. A238686 (the same for compositions).

%Y Cf. A238424, A238433, A238571.

%K nonn

%O 0,3

%A _Joerg Arndt_ and _Alois P. Heinz_, Mar 02 2014

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 24 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)