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 A271788 #13 May 27 2018 07:00:54 %S A271788 0,1,3,7,16,39,105,314,1035,3723,14494,60670,271544,1293147,6523495, %T A271788 34724247,194357190,1140402612,6995760364,44760085240,298054873358, %U A271788 2061644525813,14787185811993,109804829195145,842928183558160,6680572760715182,54595535222727960 %N A271788 Number of set partitions of [n] having exactly one pair (m,m+1) such that m is in some block b and m+1 is in block b+1. %H A271788 Alois P. Heinz, <a href="/A271788/b271788.txt">Table of n, a(n) for n = 1..500</a> %H A271788 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a> %e A271788 a(2) = 1: 1|2. %e A271788 a(3) = 3: 12|3, 13|2, 1|23. %e A271788 a(4) = 7: 123|4, 124|3, 12|34, 134|2, 13|2|4, 14|23, 1|234. %e A271788 a(5) = 16: 1234|5, 1235|4, 123|45, 1245|3, 124|3|5, 125|34, 12|345, 1345|2, 134|2|5, 135|2|4, 13|25|4, 13|2|45, 145|23, 14|23|5, 15|234, 1|2345. %p A271788 b:= proc(n, i, m, k) option remember; `if`(n=0, `if`(k=0, 1, 0), %p A271788 add(`if`(j=i+1 and k=0, 0, b(n-1, j, max(m, j), k- %p A271788 `if`(j=i+1, 1, 0))), j=1..m+1)) %p A271788 end: %p A271788 a:= n-> b(n, 1, 0, 1): %p A271788 seq(a(n), n=1..30); %t A271788 b[n_, i_, m_, k_] := b[n, i, m, k] = If[n == 0, If[k == 0, 1, 0], Sum[If[j == i + 1 && k == 0, 0, b[n - 1, j, Max[m, j], k - If[j == i + 1, 1, 0]]], {j, 1, m + 1}]]; %t A271788 a[n_] := b[n, 1, 0, 1]; %t A271788 Table[a[n], {n, 1, 30}] (* _Jean-François Alcover_, May 27 2018, translated from Maple *) %Y A271788 Column k=1 of A185982. %K A271788 nonn %O A271788 1,3 %A A271788 _Alois P. Heinz_, Apr 14 2016