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.
%I A221217 #24 Feb 16 2025 08:33:19 %S A221217 1,6,5,4,3,2,15,14,13,12,11,10,9,8,7,28,27,26,25,24,23,22,21,20,19,18, %T A221217 17,16,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,66,65,64,63, %U A221217 62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,91 %N A221217 T(n,k) = ((n+k)^2-2*n+3-(n+k-1)*(1+2*(-1)^(n+k)))/2; n , k > 0, read by antidiagonals. %C A221217 Permutation of the natural numbers. %C A221217 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 A221217 Enumeration table T(n,k). Let m be natural number. The order of the list: %C A221217 T(1,1)=1; %C A221217 T(3,1), T(2,2), T(1,3); %C A221217 T(2,1), T(1,2); %C A221217 . . . %C A221217 T(2*m+1,1), T(2*m,2), T(2*m-1,3),...T(1,2*m+1); %C A221217 T(2*m,1), T(2*m-1,2), T(2*m-2,3),...T(1,2*m); %C A221217 . . . %C A221217 First row contains antidiagonal {T(1,2*m+1), ... T(2*m+1,1)}, read upwards. %C A221217 Second row contains antidiagonal {T(1,2*m), ... T(2*m,1)}, read upwards. %H A221217 Boris Putievskiy, <a href="/A221217/b221217.txt">Rows n = 1..140 of triangle, flattened</a> %H A221217 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 A221217 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing functions</a> %H A221217 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A221217 As table %F A221217 T(n,k) = ((n+k)^2-2*n+3-(n+k-1)*(1+2*(-1)^(n+k)))/2. %F A221217 As linear sequence %F A221217 a(n) = (A003057(n)^2-2*A002260(n)+3-A002024(n)*(1+2*(-1)^A003056(n)))/2; %F A221217 a(n) = ((t+2)^2-2*i+3-(t+1)*(1+2*(-1)**t))/2, where i=n-t*(t+1)/2, %F A221217 j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). %e A221217 The start of the sequence as table: %e A221217 1....6...4..15..11..28..22... %e A221217 5....3..14..10..27..21..44... %e A221217 2...13...9..26..20..43..35... %e A221217 12...8..25..19..42..34..63... %e A221217 7...24..18..41..33..62..52... %e A221217 23..17..40..32..61..51..86... %e A221217 16..39..31..60..50..85..73... %e A221217 . . . %e A221217 The start of the sequence as triangle array read by rows: %e A221217 1; %e A221217 6,5; %e A221217 4,3,2; %e A221217 15,14,13,12; %e A221217 11,10,9,8,7; %e A221217 28,27,26,25,24,23; %e A221217 22,21,20,19,18,17,16; %e A221217 . . . %e A221217 Row number r consecutive contains r numbers in decreasing order. %o A221217 (Python) %o A221217 t=int((math.sqrt(8*n-7) - 1)/ 2) %o A221217 i=n-t*(t+1)/2 %o A221217 j=(t*t+3*t+4)/2-n %o A221217 result=((t+2)**2-2*i+3-(t+1)*(1+2*(-1)**t))/2 %Y A221217 Cf. A211394, A221215, A002260, A004736, A003057, A002024; %Y A221217 table T(n,k) contains: in rows A084849, A000384, A014106, A014105, A014107, A091823, A071355, A091823, A071355, A100040, A130861, A100041; %Y A221217 in columns A130883, A096376, A033816, A100037, A100038, A100039; %Y A221217 main diagonal and parallel diagonals are A058331, A051890, A005893, A097080, A093328, A137882, A001844, A001105, A056220, A142463, A054000, A090288, A059993. %K A221217 nonn,tabl %O A221217 1,2 %A A221217 _Boris Putievskiy_, Feb 22 2013