login
Inverse permutation to A210521.
1

%I #36 Aug 22 2023 12:00:47

%S 1,4,2,5,3,6,11,7,12,8,13,9,14,10,15,22,16,23,17,24,18,25,19,26,20,27,

%T 21,28,37,29,38,30,39,31,40,32,41,33,42,34,43,35,44,36,45,56,46,57,47,

%U 58,48,59,49,60,50,61,51,62,52,63,53,64,54,65,55,66,79

%N Inverse permutation to A210521.

%C Permutation of the natural numbers.

%C 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.

%C Enumeration table T(n,k). The order of the list:

%C T(1,1)=1;

%C T(2,1), T(2,2), T(1,2), T(1,3), T(3,1),

%C ...

%C T(2,n-1), T(4,n-3), T(6,n-5), ..., T(n,1),

%C T(2,n), T(4,n-2), T(6,n-4), ..., T(n,2),

%C T(1,n), T(3,n-2), T(5,n-4), ..., T(n-1,2),

%C T(1,n+1), T(3,n-1), T(5,n-3), ..., T(n+1,1),

%C ...

%C The order of the list elements of adjacent antidiagonals. Let m be a positive integer.

%C Movement by antidiagonal {T(1,2*m), T(2*m,1)} from T(2,2*m-1) to T(2*m,1) length of step is 2,

%C movement by antidiagonal {T(1,2*m+1), T(2*m+1,1)} from T(2,2*m) to T(2*m,2) length of step is 2,

%C movement by antidiagonal {T(1,2*m), T(2*m,1)} from T(1,2*m) to T(2*m-1,2) length of step is 2,

%C movement by antidiagonal {T(1,2*m+1), T(2*m+1,1)} from T(1,2*m+1) to T(2*m+1,1) length of step is 2.

%C Table contains:

%C row 1 is alternation of elements A001844 and A084849,

%C row 2 is alternation of elements A130883 and A058331,

%C row 3 is alternation of elements A051890 and A096376,

%C row 4 is alternation of elements A033816 and A005893,

%C row 6 is alternation of elements A100037 and A093328;

%C row 5 accommodates elements A097080 in odd places,

%C row 7 accommodates elements A137882 in odd places,

%C row 10 accommodates elements A100038 in odd places,

%C row 14 accommodates elements A100039 in odd places;

%C column 1 is A093005 and alternation of elements A000384 and A001105,

%C column 2 is alternation of elements A046092 and A014105,

%C column 3 is A105638 and alternation of elements A014106 and A056220,

%C column 4 is alternation of elements A142463 and A014107,

%C column 5 is alternation of elements A091823 and A054000,

%C column 6 is alternation of elements A090288 and |A168244|,

%C column 8 is alternation of elements A059993 and A033537;

%C column 7 accommodates elements A071355 in odd places,

%C column 9 accommodates elements |A147973| in even places,

%C column 10 accommodates elements A139570 in odd places,

%C column 13 accommodates elements A130861 in odd places.

%H Boris Putievskiy, <a href="/A199855/b199855.txt">Rows n = 1..140 of triangle, flattened</a>

%H Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations [of] Integer Sequences And Pairing Functions</a> arXiv:1212.2732 [math.CO], 2012.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PairingFunction.html">Pairing functions</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F T(n,k) = (2*k^2+(4*n-5)*k+2*n^2-3*n+2+(2+(-1)^k)*((1-(k+n-1)*(-1)^i)))/4.

%F a(n) = (2*j^2+(4*i-5)*j+2*i^2-3*i+2+(2+(-1)^j)*((1-(t+1)*(-1)^i)))/4, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((sqrt(8*n-7) - 1)/2).

%e The start of the sequence as table:

%e 1, 4, 5, 11, 13, 22, 25, 37, 41, 56, 61, ...

%e 2, 3, 7, 9, 16, 19, 29, 33, 46, 51, 67, ...

%e 6, 12, 14, 23, 26, 38, 42, 57, 62, 80, 86, ...

%e 8, 10, 17, 20, 30, 34, 47, 52, 68, 74, 93, ...

%e 15, 24, 27, 39, 43, 58, 63, 81, 87, 108, 115, ...

%e 18, 21, 31, 35, 48, 53, 69, 75, 94, 101. 123, ...

%e 28, 40, 44, 59, 64, 82, 88, 109, 116, 140, 148, ...

%e 32, 36, 49, 54, 70, 76, 95, 102, 124, 132, 157, ...

%e 45, 60, 65, 83, 89, 110, 117, 141, 149, 176, 185, ...

%e 50, 55, 71, 77, 96, 103, 125, 133, 158, 167, 195, ...

%e 66, 84, 90, 111, 118, 142, 150, 177, 186, 216, 226, ...

%e ...

%e The start of the sequence as triangle array read by rows:

%e 1;

%e 4, 2;

%e 5, 3, 6;

%e 11, 7, 12, 8;

%e 13, 9, 14, 10, 15;

%e 22, 16, 23, 17, 24, 18;

%e 25, 19, 26, 20, 27, 21, 28;

%e 37, 29, 38, 30, 39, 31, 40, 32;

%e 41, 33, 42, 34, 43, 35, 44, 36, 45;

%e 56, 46, 57, 47, 58, 48, 59, 49, 60, 50;

%e 61, 51, 62, 52, 63, 53, 64, 54, 65, 55, 66;

%e ...

%e The start of the sequence as array read by rows, the length of row r is 4*r-3.

%e First 2*r-2 numbers are from the row number 2*r-2 of triangle array, located above.

%e Last 2*r-1 numbers are from the row number 2*r-1 of triangle array, located above.

%e 1;

%e 4, 2, 5, 3, 6;

%e 11, 7,12, 8,13, 9,14,10,15;

%e 22,16,23,17,24,18,25,19,26,20,27,21,28;

%e 37,29,38,30,39,31,40,32,41,33,42,34,43,35,44,36,45;

%e 56,46,57,47,58,48,59,49,60,50,61,51,62,52,63,53,64,54,65,55,66;

%e ...

%e Row number r contains permutation numbers 4*r-3 from 2*r*r-5*r+4 to 2*r*r-r:

%e 2*r*r-3*r+2,2*r*r-5*r+4, 2*r*r-3*r+3, 2*r*r-5*r+5, 2*r*r-3*r+4, 2*r*r-5*r+6, ..., 2*r*r-3*r+1, 2*r*r-r.

%e ...

%o (Python)

%o t=int((math.sqrt(8*n-7) - 1)/ 2)

%o i=n-t*(t+1)/2

%o j=(t*t+3*t+4)/2-n

%o result=(2*j**2+(4*i-5)*j+2*i**2-3*i+2+(2+(-1)**j)*((1-(t+1)*(-1)**i)))/4

%Y Cf. A210521, A001844, A084849, A130883, A058331, A051890, A096376, A033816, A005893, A100037, A093328, A097080, A137882, A100038, A100039, A093005, A000384, A001105, A046092, A014105, A105638, A014106, A056220, A142463, A014107, A091823, A054000, A090288, A168244, A059993, A033537, A071355, A147973, A139570, A130861.

%K nonn,tabl

%O 1,2

%A _Boris Putievskiy_, Feb 04 2013