cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A261961 Number of ordered set partitions of {1,2,...,n} such that no part has the same size as any of its two immediate predecessors.

This page as a plain text file.
%I A261961 #9 May 24 2018 11:08:23
%S A261961 1,1,1,7,9,31,403,1597,7913,68551,539691,4359037,48419715,560648557,
%T A261961 4985097601,59798395027,869794249513,11143895125527,159575614945315,
%U A261961 2593765421983597,38615447492264219,642012651525487501,11768461266053785921,220201814964135821967
%N A261961 Number of ordered set partitions of {1,2,...,n} such that no part has the same size as any of its two immediate predecessors.
%H A261961 Alois P. Heinz, <a href="/A261961/b261961.txt">Table of n, a(n) for n = 0..250</a>
%p A261961 b:= proc(n, i, j) option remember; `if`(n=0, 1, add(
%p A261961       `if`(k=i or k=j, 0, (t-> binomial(n, k)*b(t,
%p A261961       `if`(k>t, 0, k), `if`(i>t, 0, i)))(n-k)), k=1..n))
%p A261961     end:
%p A261961 a:= n-> b(n, 0$2):
%p A261961 seq(a(n), n=0..30);
%t A261961 b[n_, i_, j_] := b[n, i, j] = If[n == 0, 1, Sum[If[k == i || k == j, 0, Function[t, Binomial[n, k]*b[t, If[k > t, 0, k], If[i > t, 0, i]]][n - k]], {k, 1, n}]];
%t A261961 a[n_] := b[n, 0, 0];
%t A261961 Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, May 24 2018, translated from Maple *)
%Y A261961 Column k=2 of A261959.
%Y A261961 Cf. A261962.
%K A261961 nonn
%O A261961 0,4
%A A261961 _Alois P. Heinz_, Sep 06 2015