login
A339399
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,... .
18
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, 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, 8, 5, 7, 6, 6, 1, 12, 2, 11, 3, 10, 4, 9, 5, 8, 6, 7, 1, 13, 2, 12, 3, 11
OFFSET
1,4
COMMENTS
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.
FORMULA
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.
a(n) = A339443(A103889(n)). - Wesley Ivan Hurt, May 09 2021
EXAMPLE
[1,9]
[1,7] [1,8] [2,8]
[1,5] [1,6] [2,6] [2,7] [3,7]
[1,3] [1,4] [2,4] [2,5] [3,5] [3,6] [4,6]
[1,1] [1,2] [2,2] [2,3] [3,3] [3,4] [4,4] [4,5] [5,5]
k 2 3 4 5 6 7 8 9 10
--------------------------------------------------------------------------
k Nondecreasing partitions of k
--------------------------------------------------------------------------
2 1,1
3 1,2
4 1,3,2,2
5 1,4,2,3
6 1,5,2,4,3,3
7 1,6,2,5,3,4
8 1,7,2,6,3,5,4,4
9 1,8,2,7,3,6,4,5
10 1,9,2,8,3,7,4,6,5,5
...
MATHEMATICA
t[n_] := Flatten[Reverse /@ IntegerPartitions[n, {2}]]; Array[t, 14, 2] // Flatten (* Amiram Eldar, Dec 03 2020 *)
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 *)
PROG
(PARI) row(n) = vector(n\2, i, [i, n-i]);
tabf(nn) = for (n=2, nn, print(row(n))); \\ Michel Marcus, Dec 03 2020
CROSSREFS
Bisections: A122197 (odd), A199474 (even).
Sequence in context: A364969 A374999 A374997 * A272911 A371014 A284267
KEYWORD
nonn,tabf
AUTHOR
Wesley Ivan Hurt, Dec 02 2020
STATUS
approved