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.

A342136 Number of partitions of [2n] into pairs whose sums and differences are primes.

This page as a plain text file.
%I A342136 #22 Aug 25 2021 07:01:37
%S A342136 1,0,0,0,1,2,6,10,22,101,66,504,2088,3572,14398,49984,108030,191228,
%T A342136 1087758,5005440,14081453,97492234,160186634,939652634,3926077642,
%U A342136 4273706733,41832174879,214185383046,494248121522,6153003414039,38125026176659,13635112709648,39350572537836,511502485322923,1069875349612147,5075263842958032
%N A342136 Number of partitions of [2n] into pairs whose sums and differences are primes.
%H A342136 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a>
%e A342136 a(4) = 1: {{1,6}, {2,5}, {3,8}, {4,7}}.
%e A342136 a(5) = 2: {{1,6}, {2,9}, {3,10}, {4,7}, {5,8}}, {{1,6}, {2,5}, {3,8}, {4,9}, {7,10}}.
%p A342136 b:= proc(s) option remember; `if`(s={}, 1, (j-> add(`if`(i<j and
%p A342136       andmap(isprime, [j+i, j-i]), b(s minus {i, j}), 0), i=s))(max(s)))
%p A342136     end:
%p A342136 a:= n-> b({$1..2*n}):
%p A342136 seq(a(n), n=0..15);
%t A342136 b[s_] := b[s] = If[s == {}, 1, With[{j = Max[s]}, Sum[If[i < j && AllTrue[{j+i, j-i}, PrimeQ], b[s ~Complement~ {i, j}], 0], {i, s}]]];
%t A342136 a[n_] := b[Range[2n]];
%t A342136 a /@ Range[0, 15] (* _Jean-François Alcover_, Aug 25 2021, after _Alois P. Heinz_ *)
%Y A342136 Cf. A000341, A009692, A342139, A342155.
%K A342136 nonn
%O A342136 0,6
%A A342136 _Alois P. Heinz_, Mar 01 2021
%E A342136 a(25)-a(35) from _Bert Dobbelaere_, Mar 06 2021