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 A271271 #12 Feb 02 2017 09:15:15 %S A271271 0,0,0,0,1,9,58,341,1983,11776,72345,462173,3075894,21330762, %T A271271 154050330,1157493707,9037925277,73244123107,615295131046, %U A271271 5351329029624,48126530239366,447043890866154,4284293705043796,42317095568379559,430355360965092107,4501973706497500364 %N A271271 Number of set partitions of [n] such that at least one pair of consecutive blocks (b,b+1) exists having no pair of consecutive numbers (i,i+1) with i member of b and i+1 member of b+1. %H A271271 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a> %F A271271 a(n) = A000110(n) - A271270(n). %e A271271 a(4) = 1: 13|2|4. %e A271271 a(5) = 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 A271271 b:= proc(n, i, m, l) option remember; `if`(n=0, %p A271271 `if`(l=[] or {l[]}={1}, 1, 0), add(b(n-1, j, max(m, j), %p A271271 `if`(j=m+1, `if`(j=i+1, [l[],1], [l[],0]), %p A271271 `if`(j=i+1, subsop(j=1, l), l))), j=1..m+1)) %p A271271 end: %p A271271 a:= n-> combinat[bell](n)-b(n, 0$2, []): %p A271271 seq(a(n), n=0..18); %t A271271 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_] := BellB[n] - b[n, 0, 0, {}]; Table[a[n], {n, 0, 18}] (* _Jean-François Alcover_, Feb 02 2017, translated from Maple *) %Y A271271 Cf. A000110, A185982, A271270, A271273, A272065. %K A271271 nonn %O A271271 0,6 %A A271271 _Alois P. Heinz_, Apr 03 2016