login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A211394 T(n,k) = (k+n)*(k+n-1)/2-(k+n-1)*(-1)^(k+n)-k+2; n , k > 0, read by antidiagonals. 4
1, 5, 6, 2, 3, 4, 12, 13, 14, 15, 7, 8, 9, 10, 11, 23, 24, 25, 26, 27, 28, 16, 17, 18, 19, 20, 21, 22, 38, 39, 40, 41, 42, 43, 44, 45, 29, 30, 31, 32, 33, 34, 35, 36, 37, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 80 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Permutation of the natural numbers.
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.
Enumeration table T(n,k). The order of the list:
T(1,1)=1;
T(1,3), T(2,2), T(3,1);
T(1,2), T(2,1);
. . .
T(1,n), T(2,n-1), T(3,n-2), ... T(n,1);
T(1,n-1), T(2,n-3), T(3,n-4),...T(n-1,1);
. . .
First row matches with the elements antidiagonal {T(1,n), ... T(n,1)},
second row matches with the elements antidiagonal {T(1,n-1), ... T(n-1,1)}.
Table contains:
row 1 is alternation of elements A130883 and A096376,
row 2 accommodates elements A033816 in even places,
row 3 accommodates elements A100037 in odd places,
row 5 accommodates elements A100038 in odd places;
column 1 is alternation of elements A084849 and A000384,
column 2 is alternation of elements A014106 and A014105,
column 3 is alternation of elements A014107 and A091823,
column 4 is alternation of elements A071355 and |A168244|,
column 5 accommodates elements A033537 in even places,
column 7 is alternation of elements A100040 and A130861,
column 9 accommodates elements A100041 in even places;
the main diagonal is A058331,
diagonal 1, located above the main diagonal is A001844,
diagonal 2, located above the main diagonal is A001105,
diagonal 3, located above the main diagonal is A046092,
diagonal 4, located above the main diagonal is A056220,
diagonal 5, located above the main diagonal is A142463,
diagonal 6, located above the main diagonal is A054000,
diagonal 7, located above the main diagonal is A090288,
diagonal 9, located above the main diagonal is A059993,
diagonal 10, located above the main diagonal is |A147973|,
diagonal 11, located above the main diagonal is A139570;
diagonal 1, located under the main diagonal is A051890,
diagonal 2, located under the main diagonal is A005893,
diagonal 3, located under the main diagonal is A097080,
diagonal 4, located under the main diagonal is A093328,
diagonal 5, located under the main diagonal is A137882.
LINKS
Boris Putievskiy, Transformations [of] Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO], 2012.
Eric Weisstein's World of Mathematics, Pairing functions
FORMULA
T(n,k) = (k+n)*(k+n-1)/2-(k+n-1)*(-1)^(k+n)-k+2.
As linear sequence
a(n) = A003057(n)*A002024(n)/2- A002024(n)*(-1)^A003056(n)-A004736(n)+2.
a(n) = (t+2)*(t+1)/2 - (t+1)*(-1)^t-j+2, where j=(t*t+3*t+4)/2-n and t=int((math.sqrt(8*n-7) - 1)/ 2).
EXAMPLE
The start of the sequence as table:
1....5...2..12...7..23..16...
6....3..13...8..24..17..39...
4...14...9..25..18..40..31...
15..10..26..19..41..32..60...
11..27..20..42..33..61..50...
28..21..43..34..62..51..85...
22..44..35..63..52..86..73...
. . .
The start of the sequence as triangle array read by rows:
1;
5,6;
2,3,4;
12,13,14,15;
7,8,9,10,11;
23,24,25,26,27,28;
16,17,18,19,20,21,22;
. . .
Row number r matches with r numbers segment {(r+1)*r/2-r*(-1)^(r+1)-r+2,... (r+1)*r/2-r*(-1)^(r+1)+1}.
MATHEMATICA
T[n_, k_] := (n+k)(n+k-1)/2 - (-1)^(n+k)(n+k-1) - k + 2;
Table[T[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Dec 06 2018 *)
PROG
(Python)
t=int((math.sqrt(8*n-7) - 1)/ 2)
j=(t*t+3*t+4)/2-n
result=(t+2)*(t+1)/2-(t+1)*(-1)**t-j+2
CROSSREFS
Sequence in context: A195718 A354214 A210522 * A060011 A021068 A286300
KEYWORD
nonn,tabl
AUTHOR
Boris Putievskiy, Feb 08 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 23:40 EDT 2024. Contains 371798 sequences. (Running on oeis4.)