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.

A214871 Natural numbers placed in table T(n,k) layer by layer. The order of placement - T(n,n), T(1,n), T(n,1), T(2,n), T(n,2),...T(n-1,n), T(n,n-1). Table T(n,k) read by antidiagonals.

This page as a plain text file.
%I A214871 #21 Feb 16 2025 08:33:18
%S A214871 1,3,4,6,2,7,11,8,9,12,18,13,5,14,19,27,20,15,16,21,28,38,29,22,10,23,
%T A214871 30,39,51,40,31,24,25,32,41,52,66,53,42,33,17,34,43,54,67,83,68,55,44,
%U A214871 35,36,45,56,69,84,102,85,70,57,46,26,47,58,71,86,103,123
%N A214871 Natural numbers placed in table T(n,k) layer by layer. The order of placement - T(n,n), T(1,n), T(n,1), T(2,n), T(n,2),...T(n-1,n), T(n,n-1). Table T(n,k) read by antidiagonals.
%C A214871 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 A214871 Layer is pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1).
%C A214871 Enumeration table T(n,k) layer by layer. The order of the list:
%C A214871   T(1,1)=1;
%C A214871   T(2,2), T(1,2), T(2,1);
%C A214871   . . .
%C A214871   T(n,n), T(1,n), T(n,1), T(2,n), T(n,2),...T(n-1,n), T(n,n-1);
%C A214871   . . .
%H A214871 Boris Putievskiy, <a href="/A214871/b214871.txt">Rows n = 1..140 of triangle, flattened</a>
%H A214871 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 A214871 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing functions</a>
%H A214871 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A214871 As table
%F A214871 T(n,k) = (n-1)^2+1,     if n=k;
%F A214871 T(n,k) = (n-1)^2+2*k+1, if n>k;
%F A214871 T(n,k) = (k-1)^2+2*n,   if n<k.
%F A214871 As linear sequence
%F A214871 a(n) = (i-1)^2+1,     if i=j;
%F A214871 a(n) = (i-1)^2+2*j+1, if i>j;
%F A214871 a(n) = (j-1)^2+2*i,   if i>j; where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).
%e A214871 The start of the sequence as table:
%e A214871   1....3...6..11..18..27...
%e A214871   4....2...8..13..20..29...
%e A214871   7....9...5..15..22..31...
%e A214871   12..14..16..10..24..33...
%e A214871   19..21..23..25..17..35...
%e A214871   28..30..32..34..36..26...
%e A214871   . . .
%e A214871 The start of the sequence as triangle array read by rows:
%e A214871   1;
%e A214871   3,4;
%e A214871   6,2,7;
%e A214871   11,8,9,12;
%e A214871   18,13,5,14,19;
%e A214871   27,20,15,16,21,28;
%e A214871   . . .
%o A214871 (Python)
%o A214871 t=int((math.sqrt(8*n-7) - 1)/ 2)
%o A214871 i=n-t*(t+1)/2
%o A214871 j=(t*t+3*t+4)/2-n
%o A214871 if i == j:
%o A214871    result=(i-1)**2+1
%o A214871 if i > j:
%o A214871    result=(i-1)**2+2*j+1
%o A214871 if i < j:
%o A214871    result=(j-1)**2+2*i
%Y A214871 Cf. A060734, A060736, A185725, A213921, A213922; table T(n,k) contains: in rows A059100, A087475, A114949, A189833, A114948, A114962; in columns A117950, A117951, A117619, A189834, A189836; the main diagonal is A002522.
%K A214871 nonn,tabl
%O A214871 1,2
%A A214871 _Boris Putievskiy_, Mar 11 2013