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!)
A271207 Number of set partitions of [n] avoiding triples (t,t+1,t+2) having t+i in block b+i for some b. 2

%I #12 May 27 2018 07:00:45

%S 1,1,2,4,10,28,89,315,1233,5285,24583,123062,658335,3741625,22483415,

%T 142264589,944652336,6562959239,47583055191,359196368057,

%U 2817394708454,22919157785777,193045807856919,1681025045594032,15112573721911697,140088106892677440

%N Number of set partitions of [n] avoiding triples (t,t+1,t+2) having t+i in block b+i for some b.

%H Alois P. Heinz, <a href="/A271207/b271207.txt">Table of n, a(n) for n = 0..300</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>

%e a(4) = 10: 1234, 123|4, 124|3, 12|34, 134|2, 13|24, 13|2|4, 14|23, 1|234, 1|23|4.

%p b:= proc(n, i, t, m) option remember; `if`(n=0, 1, add(`if`(

%p t and j=i+1, 0, b(n-1, j, is(j=i+1), max(m, j))), j=1..m+1))

%p end:

%p a:= n-> b(n, 1, false, 0):

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

%t b[n_, i_, t_, m_] := b[n, i, t, m] = If[n == 0, 1, Sum[If[t && j == i + 1, 0, b[n - 1, j, j == i + 1, Max[m, j]]], {j, 1, m + 1}]];

%t a[n_] := b[n, 1, False, 0];

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

%Y Column k=0 of A271206.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Apr 01 2016

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 July 22 02:43 EDT 2024. Contains 374479 sequences. (Running on oeis4.)