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.

A214928 A209293 as table read layer by layer clockwise.

This page as a plain text file.
%I A214928 #31 Mar 23 2025 23:33:36
%S A214928 1,2,4,3,5,9,14,7,6,8,12,17,23,20,11,10,13,19,26,34,43,30,27,16,15,18,
%T A214928 24,31,39,48,58,53,38,35,22,21,25,33,42,52,63,75,88,69,64,47,44,29,28,
%U A214928 32,40,49,59,70,82,95,109,102,81,76,57,54,37,36,41,51,62
%N A214928 A209293 as table read layer by layer clockwise.
%C A214928 Permutation of the natural numbers.
%C A214928 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 A214928 Layer is pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1). The order of the list:
%C A214928 T(1,1)=1;
%C A214928 T(1,2), T(2,2), T(2,1);
%C A214928 . . .
%C A214928 T(1,n), T(2,n), ... T(n-1,n), T(n,n), T(n,n-1), ... T(n,1);
%C A214928 . . .
%H A214928 Boris Putievskiy, <a href="/A214928/b214928.txt">Rows n = 1..140 of triangle, flattened</a>
%H A214928 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 A214928 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing functions</a>
%H A214928 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A214928 As table
%F A214928 T(n,k) = n*n/2+4*(floor((k-1)/2)+1)*n+ceiling((k-1)^2/2), n,k > 0.
%F A214928 As linear sequence
%F A214928 a(n)= (m1+m2-1)*(m1+m2-2)/2+m1, where m1=floor((i+j)/2) + floor(i/2)*(-1)^(2*i+j-1), m2=int((i+j+1)/2)+int(i/2)*(-1)^(2*i+j-2), where i=min(t; n-(t-1)^2), j=min(t; t^2-n+1), t=floor(sqrt(n-1))+1.
%e A214928 The start of the sequence as table:
%e A214928   1....2...5...8..13..18...
%e A214928   3....4...9..12..19..24...
%e A214928   6....7..14..17..26..31...
%e A214928   10..11..20..23..34..39...
%e A214928   15..16..27..30..43..48...
%e A214928   21..22..35..38..53..58...
%e A214928   . . .
%e A214928 The start of the sequence as triangle array read by rows:
%e A214928   1;
%e A214928   2,4,3;
%e A214928   5,9,14,7,6;
%e A214928   8,12,17,23,20,11,10;
%e A214928   13,19,26,34,43,30,27,16,15;
%e A214928   18,24,31,39,48,58,53,38,35,22,21;
%e A214928   . . .
%e A214928 Row number r contains 2*r-1 numbers.
%o A214928 (Python)
%o A214928 t=int((math.sqrt(n-1)))+1
%o A214928 i=min(t,n-(t-1)**2)
%o A214928 j=min(t,t**2-n+1)
%o A214928 m1=int((i+j)/2)+int(i/2)*(-1)**(2*i+j-1)
%o A214928 m2=int((i+j+1)/2)+int(i/2)*(-1)**(2*i+j-2)
%o A214928 result=(m1+m2-1)*(m1+m2-2)/2+m1
%Y A214928 Cf. A209293, A209279, A209278, A185180, A060734, A060736; table T(n,k) contains: in rows A000982, A097063; in columns A000217, A000124, A000096, A152948, A034856, A152950, A055998, A000982, A097063.
%K A214928 nonn,tabl
%O A214928 1,2
%A A214928 _Boris Putievskiy_, Mar 11 2013