

A213197


T(n,k) = (2*(n+k)^2  2*(n+k)  4*k + 6 + (2*k2)*(1)^n + (2*k1)*(1)^k + (2*n+1)*(1)^(n+k))/4; n, k > 0, read by antidiagonals.


4



1, 3, 4, 2, 6, 5, 8, 9, 11, 12, 7, 15, 10, 14, 13, 17, 18, 20, 21, 23, 24, 16, 28, 19, 27, 22, 26, 25, 30, 31, 33, 34, 36, 37, 39, 40, 29, 45, 32, 44, 35, 43, 38, 42, 41, 47, 48, 50, 51, 53, 54, 56, 57, 59, 60, 46, 66, 49, 65, 52, 64, 55, 63, 58, 62, 61, 68
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Enumeration table T(n,k). Let m be natural number. The order of the list:
T(1,1)=1;
T(3,1), T(2,2), T(1,3);
T(2,1), T(1,2);
...
T(1,2*m+1), T(1,2*m), T(2, 2*m1), T(3, 2*m1),... T(2*m,1), T(2*m+1,1);
T(2*m,2), T(2*m2,4), ...T(2,2*m);
...
Movement along two adjacent antidiagonals. The first row consists of phases: step to the west, step to the southwest, step to the south. The second row consists of phases: 2 steps to the north, 2 steps to the east. The length of each step is 1.


LINKS



FORMULA

As a table:
T(n,k) = (2*(n+k)^2  2*(n+k)  4*k + 6 + (2*k2)*(1)^n + (2*k1)*(1)^k + (2*n+1)*(1)^(n+k))/4.
As a linear sequence:
a(n) = (2*(t+2)^2  2*(t+2)  4*j + 6 + (2*j2)*(1)^i + (2*j1)*(1)^j + (2*i+1)*(1)^t)/4, where i = n  t*(t+1)/2, j = (t*t + 3*t + 4)/2  n, t = floor((1+sqrt(8*n7))/2).


EXAMPLE

The start of the sequence as a table:
1, 3, 2, 8, 7, 17, 16, ...
4, 6, 9, 15, 18, 28, 31, ...
5, 11, 10, 20, 19, 33, 32, ...
12, 14, 21, 27, 34, 44, 51, ...
13, 23, 22, 36, 35, 53, 52, ...
24, 26, 37, 43, 54, 64, 75, ...
25, 39, 38, 56, 55, 77, 76, ...
...
The start of the sequence as a triangular array read by rows:
1;
3, 4;
2, 6, 5;
8, 9, 11, 12;
7, 15, 10, 14, 13;
17, 18, 20, 21, 23, 24;
16, 28, 19, 27, 22, 26, 25;
...
The start of the sequence as an array read by rows, the length of row r is 4*r3.
First 2*r2 numbers are from row 2*r2 of the triangular array above.
Last 2*r1 numbers are from row 2*r1 of the triangular array above.
1;
3, 4, 2, 6, 5;
8, 9, 11, 12, 7, 15, 10, 14, 13;
17, 18, 20, 21, 23, 24, 16, 28, 19, 27, 22, 26, 25;
...
Row r contains permutation of 4*r3 numbers from 2*r*r5*r+4 to 2*r*rr:
2*r*r5*r+5, 2*r*r5*r+6, ..., 2*r*r2*r+2, 2*r*r2*r+1.


MAPLE

T:=(n, k)>(2*(n+k)^22*(n+k)4*k+6+(2*k2)*(1)^n+(2*k1)*(1)^k+(1+2*n)*(1)^(n+k))/4: seq(seq(T(k, nk), k=1..n1), n=1..13); # Muniru A Asiru, Dec 06 2018


MATHEMATICA

T[n_, k_] := (2(n+k)^2  2(n+k)  4k + 6 + (2k2)(1)^n + (2k1)(1)^k + (2n+1)(1)^(n+k))/4;


PROG

(Python)
t=int((math.sqrt(8*n7)  1)/ 2)
i=nt*(t+1)/2
j=(t*t+3*t+4)/2n
result=(2*(t+2)**22*(t+2)4*j+6 +(2*j2)*(1)**i+(2*j1)*(1)**j+(2*i+1)*(1)**t)/4


CROSSREFS

Table T(n,k) contains: in rows A130883, A033816, A100037, A000384, A100038, A014106, A091823; in columns A001844, A142463, A090288, A139570, A046092, A051890, A059993, A097080, A181510, A137882, A152813.


KEYWORD



AUTHOR



STATUS

approved



