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 A342155 #18 Aug 25 2021 06:59:15 %S A342155 1,1,2,3,7,26,55,282,1520,2685,27005,171474,768123,5936728,43976303, %T A342155 207493790,2570789335,21669733984,136340261314,1639978185920 %N A342155 Number of partitions of [2n] into pairs such that either their sum or their absolute difference is a prime (but not both). %H A342155 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a> %e A342155 a(4) = 7: %e A342155 {{1,8}, {2,7}, {3,5}, {4,6}}, %e A342155 {{1,8}, {2,7}, {3,4}, {5,6}}, %e A342155 {{1,8}, {2,4}, {3,6}, {5,7}}, %e A342155 {{1,8}, {2,3}, {4,6}, {5,7}}, %e A342155 {{1,8}, {2,4}, {3,5}, {6,7}}, %e A342155 {{1,3}, {2,4}, {5,7}, {6,8}}, %e A342155 {{1,2}, {3,4}, {5,7}, {6,8}}. %p A342155 b:= proc(s) option remember; `if`(s={}, 1, (j-> add(`if`(i<j and %p A342155 (isprime(j+i) xor isprime(j-i)), b(s minus {i, j}), 0), i=s))(max(s))) %p A342155 end: %p A342155 a:= n-> b({$1..2*n}): %p A342155 seq(a(n), n=0..15); %t A342155 b[s_] := b[s] = If[s == {}, 1, With[{j = Max[s]}, Sum[If[i < j && (PrimeQ[j + i] ~Xor~ PrimeQ[j - i]), b[s ~Complement~ {i, j}], 0], {i, s}]]]; %t A342155 a[n_] := b[Range[2n]]; %t A342155 a /@ Range[0, 15] (* _Jean-François Alcover_, Aug 25 2021, after _Alois P. Heinz_ *) %Y A342155 Cf. A000040, A000341, A009692, A291564, A342136, A342139. %K A342155 nonn,more %O A342155 0,3 %A A342155 _Alois P. Heinz_, Mar 02 2021