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.

A209301 Table T(n,k) n, k > 0, T(n,k)=n-k+1, if n>=k, T(n,k)=k-n+2, if n < k. Table read by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1).

This page as a plain text file.
%I A209301 #24 Feb 18 2025 04:13:32
%S A209301 1,3,1,2,4,3,1,2,3,5,4,3,1,2,3,4,6,5,4,3,1,2,3,4,5,7,6,5,4,3,1,2,3,4,
%T A209301 5,6,8,7,6,5,4,3,1,2,3,4,5,6,7,9,8,7,6,5,4,3,1,2,3,4,5,6,7,8,10,9,8,7,
%U A209301 6,5,4,3,1,2,3,4,5,6,7,8,9,11,10,9,8,7
%N A209301 Table T(n,k) n, k > 0, T(n,k)=n-k+1, if n>=k, T(n,k)=k-n+2, if n < k.  Table read by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1).
%C A209301 In general, let m be natural number. The first column of the table T(n,1) is the sequence of the natural numbers A000027. In all columns with number k (k > 1) the segment with the length of (k-1): {m+k-2, m+k-3, ..., m}  shifts the sequence A000027. For m=1 the result is A004739, for m=2 the result is A004738. This sequence is result for m=3.
%H A209301 Boris Putievskiy, <a href="/A209301/b209301.txt">Rows n = 1..140 of triangle, flattened</a>
%H A209301 Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations Integer Sequences And Pairing Functions</a>, arXiv:1212.2732 [math.CO], 2012.
%F A209301 For the general case
%F A209301 a(n) = m*v+(2*v-1)*(t*t-n)+t,
%F A209301 where
%F A209301 t = floor(sqrt(n)-1/2)+1,
%F A209301 v = floor((n-1)/t)-t+1.
%F A209301 For m=3
%F A209301 a(n) = 3*v+(2*v-1)*(t*t-n)+t,
%F A209301 where
%F A209301 t = floor(sqrt(n)-1/2)+1,
%F A209301 v = floor((n-1)/t)-t+1.
%e A209301 The start of the sequence as table for the general case:
%e A209301   1,   m, m+1, m+2, m+3, m+4, m+5, ...
%e A209301   2,   1,   m, m+1, m+2, m+3, m+4, ...
%e A209301   3,   2,   1,   m, m+1, m+2, m+3, ...
%e A209301   4,   3,   2,   1,   m, m+1, m+2, ...
%e A209301   5,   4,   3,   2,   1,   m, m+1, ...
%e A209301   6,   5,   4,   3,   2,   1,   m, ...
%e A209301   7,   6,   5,   4,   3,   2,   1, ...
%e A209301   ...
%e A209301 The start of the sequence as triangle array read by rows for the general case:
%e A209301   1;
%e A209301   m,1,2;
%e A209301   m+1,m,1,2,3;
%e A209301   m+2,m+1,m,1,2,3,4;
%e A209301   m+3,m+2,m+1,m,1,2,3,4,5;
%e A209301   m+4, m+3,m+2,m+1,m,1,2,3,4,5,6;
%e A209301   m+5, m+4, m+3,m+2,m+1,m,1,2,3,4,5,6,7;
%e A209301   ...
%e A209301 Row number r contains 2*r -1 numbers: m+r-2, m+r-1,...m,1,2,...r.
%e A209301 The start of the sequence as triangle array read by rows for m=3:
%e A209301   1;
%e A209301   3,1,2;
%e A209301   4,3,1,2,3;
%e A209301   5,4,3,1,2,3,4;
%e A209301   6,5,4,3,1,2,3,4,5;
%e A209301   7,6,5,4,3,1,2,3,4,5,6;
%e A209301   8,7,6,5,4,3,1,2,3,4,5,6,7;
%e A209301   ...
%o A209301 (Python)
%o A209301 t=int((math.sqrt(n))-0.5)+1
%o A209301 v=int((n-1)/t)-t+1
%o A209301 result=k*v+(2*v-1)*(t**2-n)+t
%Y A209301 Cf. A187760, A004739, A004738.
%K A209301 nonn,tabl
%O A209301 1,2
%A A209301 _Boris Putievskiy_, Jan 18 2013