%I #37 Jan 09 2022 00:16:27
%S 1,1,1,2,1,3,2,2,1,4,2,3,1,5,2,4,3,3,1,6,2,5,3,4,1,7,2,6,3,5,4,4,1,8,
%T 2,7,3,6,4,5,1,9,2,8,3,7,4,6,5,5,1,10,2,9,3,8,4,7,5,6,1,11,2,10,3,9,4,
%U 8,5,7,6,6,1,12,2,11,3,10,4,9,5,8,6,7,1,13,2,12,3,11
%N Pairwise listing of the partitions of k into two parts (s,t), with 0 < s <= t ordered by increasing values of s and where k = 2,3,... .
%C a(n-1) and a(n) are the lesser and greater of a twin prime pair if and only if a(n) = a(n-1) + 2 where a(n-1) and a(n) are prime.
%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>
%F a(n) = (1+(-1)^n)*(1+floor(sqrt(2*n-1-(-1)^n)))/2-((2*n+1-(-1)^n)/2-2 *Sum_{k=1..floor(sqrt(2*n-2-(-1)^n)-1)} floor((k+1)/2))*(-1)^n/2.
%F a(n) = A339443(A103889(n)). - _Wesley Ivan Hurt_, May 09 2021
%e [1,9]
%e [1,7] [1,8] [2,8]
%e [1,5] [1,6] [2,6] [2,7] [3,7]
%e [1,3] [1,4] [2,4] [2,5] [3,5] [3,6] [4,6]
%e [1,1] [1,2] [2,2] [2,3] [3,3] [3,4] [4,4] [4,5] [5,5]
%e k 2 3 4 5 6 7 8 9 10
%e --------------------------------------------------------------------------
%e k Nondecreasing partitions of k
%e --------------------------------------------------------------------------
%e 2 1,1
%e 3 1,2
%e 4 1,3,2,2
%e 5 1,4,2,3
%e 6 1,5,2,4,3,3
%e 7 1,6,2,5,3,4
%e 8 1,7,2,6,3,5,4,4
%e 9 1,8,2,7,3,6,4,5
%e 10 1,9,2,8,3,7,4,6,5,5
%e ...
%t t[n_] := Flatten[Reverse /@ IntegerPartitions[n, {2}]]; Array[t, 14, 2] // Flatten (* _Amiram Eldar_, Dec 03 2020 *)
%t Table[(1 + (-1)^n) (1 + Floor[Sqrt[2 n - 1 - (-1)^n]])/2 - ((2 n + 1 - (-1)^n)/2 - 2 Sum[Floor[(k + 1)/2], {k, -1 + Floor[Sqrt[2 n - 2 - (-1)^n]]}]) (-1)^n/2, {n, 100}] (* _Wesley Ivan Hurt_, Dec 04 2020 *)
%o (PARI) row(n) = vector(n\2, i, [i, n-i]);
%o tabf(nn) = for (n=2, nn, print(row(n))); \\ _Michel Marcus_, Dec 03 2020
%Y Cf. A103889, A339443.
%Y Bisections: A122197 (odd), A199474 (even).
%K nonn,tabf
%O 1,4
%A _Wesley Ivan Hurt_, Dec 02 2020