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.
%I A271270 #17 Jan 30 2017 09:09:14 %S A271270 1,1,2,5,14,43,145,536,2157,9371,43630,216397,1137703,6313675, %T A271270 36848992,225464838,1442216870,9620746697,66781675113,481413175433, %U A271270 3597627996006,27825925290597,222422033403527,1834910286704787,15603508329713182,136616625732498989 %N A271270 Number of set partitions of [n] such that for each pair of consecutive blocks (b,b+1) at least one pair of consecutive numbers (i,i+1) exists with i member of b and i+1 member of b+1. %H A271270 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a> %F A271270 a(n) = A000110(n) - A271271(n). %e A271270 A000110(4) - a(4) = 15 - 14 = 1: 13|2|4. %e A271270 A000110(5) - a(5) = 52 - 43 = 9: 124|3|5, 134|2|5, 135|2|4, 13|25|4, 13|2|45, 13|2|4|5, 14|23|5, 14|2|3|5, 1|24|3|5. %p A271270 b:= proc(n, i, m, l) option remember; `if`(n=0, %p A271270 `if`({l[], 1}={1}, 1, 0), add(b(n-1, j, max(m, j), %p A271270 `if`(j=m+1, [l[], `if`(j=i+1, 1, 0)], %p A271270 `if`(j=i+1, subsop(j=1, l), l))), j=1..m+1)) %p A271270 end: %p A271270 a:= n-> b(n, 0$2, []): %p A271270 seq(a(n), n=0..18); %t A271270 b[n_, i_, m_, l_] := b[n, i, m, l] = If[n == 0, If[Union[l, {1}] == {1}, 1, 0], Sum[b[n-1, j, Max[m, j], If[j == m+1, Join[l, If[j == i+1, {1}, {0}] ], If[j == i+1, ReplacePart[l, j -> 1], l]]], {j, 1, m+1}]]; a[n_] := b[n, 0, 0, {}]; Table[a[n], {n, 0, 18}] (* _Jean-François Alcover_, Jan 30 2017, translated from Maple *) %Y A271270 Cf. A000110, A185982, A271271, A271272, A272064. %K A271270 nonn %O A271270 0,3 %A A271270 _Alois P. Heinz_, Apr 03 2016