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.

A199855 Inverse permutation to A210521.

This page as a plain text file.
%I A199855 #37 Feb 16 2025 08:33:16
%S A199855 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 A199855 21,28,37,29,38,30,39,31,40,32,41,33,42,34,43,35,44,36,45,56,46,57,47,
%U A199855 58,48,59,49,60,50,61,51,62,52,63,53,64,54,65,55,66,79
%N A199855 Inverse permutation to A210521.
%C A199855 Permutation of the natural numbers.
%C A199855 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 A199855 Enumeration table T(n,k). The order of the list:
%C A199855   T(1,1)=1;
%C A199855   T(2,1), T(2,2), T(1,2), T(1,3), T(3,1),
%C A199855   ...
%C A199855   T(2,n-1), T(4,n-3), T(6,n-5), ..., T(n,1),
%C A199855   T(2,n),   T(4,n-2), T(6,n-4), ..., T(n,2),
%C A199855   T(1,n),   T(3,n-2), T(5,n-4), ..., T(n-1,2),
%C A199855   T(1,n+1), T(3,n-1), T(5,n-3), ..., T(n+1,1),
%C A199855   ...
%C A199855 The order of the list elements of adjacent antidiagonals. Let m be a positive integer.
%C A199855 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 A199855 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 A199855 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 A199855 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 A199855 Table contains:
%C A199855   row  1 is alternation of elements A001844 and A084849,
%C A199855   row  2 is alternation of elements A130883 and A058331,
%C A199855   row  3 is alternation of elements A051890 and A096376,
%C A199855   row  4 is alternation of elements A033816 and A005893,
%C A199855   row  6 is alternation of elements A100037 and A093328;
%C A199855   row  5  accommodates elements A097080 in odd places,
%C A199855   row  7  accommodates elements A137882 in odd places,
%C A199855   row 10  accommodates elements A100038 in odd places,
%C A199855   row 14  accommodates elements A100039 in odd places;
%C A199855   column 1 is A093005 and alternation of elements A000384 and A001105,
%C A199855   column 2 is alternation of elements A046092 and A014105,
%C A199855   column 3 is A105638 and alternation of elements A014106 and A056220,
%C A199855   column 4 is alternation of elements A142463 and A014107,
%C A199855   column 5 is alternation of elements A091823 and A054000,
%C A199855   column 6 is alternation of elements A090288 and |A168244|,
%C A199855   column 8 is alternation of elements A059993 and A033537;
%C A199855   column  7 accommodates elements  A071355  in odd  places,
%C A199855   column  9 accommodates elements |A147973| in even places,
%C A199855   column 10 accommodates elements  A139570  in odd  places,
%C A199855   column 13 accommodates elements  A130861  in odd  places.
%H A199855 Boris Putievskiy, <a href="/A199855/b199855.txt">Rows n = 1..140 of triangle, flattened</a>
%H A199855 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 A199855 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing functions</a>
%H A199855 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A199855 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 A199855 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 A199855 The start of the sequence as table:
%e A199855    1,  4,  5,  11,  13,  22,  25,  37,  41,  56,  61, ...
%e A199855    2,  3,  7,   9,  16,  19,  29,  33,  46,  51,  67, ...
%e A199855    6, 12, 14,  23,  26,  38,  42,  57,  62,  80,  86, ...
%e A199855    8, 10, 17,  20,  30,  34,  47,  52,  68,  74,  93, ...
%e A199855   15, 24, 27,  39,  43,  58,  63,  81,  87, 108, 115, ...
%e A199855   18, 21, 31,  35,  48,  53,  69,  75,  94, 101. 123, ...
%e A199855   28, 40, 44,  59,  64,  82,  88, 109, 116, 140, 148, ...
%e A199855   32, 36, 49,  54,  70,  76,  95, 102, 124, 132, 157, ...
%e A199855   45, 60, 65,  83,  89, 110, 117, 141, 149, 176, 185, ...
%e A199855   50, 55, 71,  77,  96, 103, 125, 133, 158, 167, 195, ...
%e A199855   66, 84, 90, 111, 118, 142, 150, 177, 186, 216, 226, ...
%e A199855   ...
%e A199855 The start of the sequence as triangle array read by rows:
%e A199855    1;
%e A199855    4,  2;
%e A199855    5,  3,  6;
%e A199855   11,  7, 12,  8;
%e A199855   13,  9, 14, 10, 15;
%e A199855   22, 16, 23, 17, 24, 18;
%e A199855   25, 19, 26, 20, 27, 21, 28;
%e A199855   37, 29, 38, 30, 39, 31, 40, 32;
%e A199855   41, 33, 42, 34, 43, 35, 44, 36, 45;
%e A199855   56, 46, 57, 47, 58, 48, 59, 49, 60, 50;
%e A199855   61, 51, 62, 52, 63, 53, 64, 54, 65, 55, 66;
%e A199855   ...
%e A199855 The start of the sequence as array read by rows, the length of row r is 4*r-3.
%e A199855 First 2*r-2 numbers are from the row number 2*r-2 of  triangle array, located above.
%e A199855 Last  2*r-1 numbers are from the row number 2*r-1 of  triangle array, located above.
%e A199855    1;
%e A199855    4, 2, 5, 3, 6;
%e A199855   11, 7,12, 8,13, 9,14,10,15;
%e A199855   22,16,23,17,24,18,25,19,26,20,27,21,28;
%e A199855   37,29,38,30,39,31,40,32,41,33,42,34,43,35,44,36,45;
%e A199855   56,46,57,47,58,48,59,49,60,50,61,51,62,52,63,53,64,54,65,55,66;
%e A199855   ...
%e A199855 Row number r contains permutation numbers 4*r-3 from 2*r*r-5*r+4 to 2*r*r-r:
%e A199855 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 A199855 ...
%o A199855 (Python)
%o A199855 t=int((math.sqrt(8*n-7) - 1)/ 2)
%o A199855 i=n-t*(t+1)/2
%o A199855 j=(t*t+3*t+4)/2-n
%o A199855 result=(2*j**2+(4*i-5)*j+2*i**2-3*i+2+(2+(-1)**j)*((1-(t+1)*(-1)**i)))/4
%Y A199855 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 A199855 nonn,tabl
%O A199855 1,2
%A A199855 _Boris Putievskiy_, Feb 04 2013