login
T(n,k) = 3*n + (k-1) mod 3 - 2; n , k > 0, read by antidiagonals.
0

%I #20 Apr 27 2021 12:46:00

%S 1,2,4,3,5,7,1,6,8,10,2,4,9,11,13,3,5,7,12,14,16,1,6,8,10,15,17,19,2,

%T 4,9,11,13,18,20,22,3,5,7,12,14,16,21,23,25,1,6,8,10,15,17,19,24,26,

%U 28,2,4,9,11,13,18,20,22,27,29,2,9,31,3,5,7,12,14,16

%N T(n,k) = 3*n + (k-1) mod 3 - 2; n , k > 0, read by antidiagonals.

%C Columns 3*k-2 are A016777,

%C Columns 3*k-1 are A016789,

%C Columns 3*k are A008585.

%C Rows 1 is A010882.

%H Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations [of] Integer Sequences And Pairing Functions</a> arXiv:1212.2732 [math.CO], 2012.

%F a(n) = 3*A002260(n) + (A004736(n) - 1) mod 3 - 2. a(n) = 3*i + (j-1) mod 3 - 2, where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).

%e The start of the sequence as table:

%e 1....2...3...1...2...3...1...2...3...

%e 4....5...6...4...5...6...4...5...6...

%e 7....8...9...7...8...9...7...8...9...

%e 10..11..12..10..11..12..10..11..12...

%e 13..14..15..13..14..15..13..14..15...

%e 16..17..18..16..17..18..16..17..18...

%e 19..20..21..19..20..21..19..20..21...

%e 22..23..24..22..23..24..22..23..24...

%e 25..26..27..25..26..27..25..26..27...

%e . . .

%e The start of the sequence as triangle array read by rows:

%e 1;

%e 2,4;

%e 3,5,7;

%e 1,6,8,10;

%e 2,4,9,11,13;

%e 3,5,7,12,14,16;

%e 1,6,8,10,15,17,19;

%e 2,4,9,11,13,18,20,22;

%e 3,5,7,12,14,16,21,23,25;

%e . . .

%o (Python)

%o t=int((math.sqrt(8*n-7) - 1)/ 2)

%o i=n-t*(t+1)/2

%o j=(t*t+3*t+4)/2-n

%o result=3*i + (j-1) % 3 - 2

%Y Cf. A016777, A016789, A008585, A010882, A002260, A004736, A131225.

%K nonn,tabl

%O 1,2

%A _Boris Putievskiy_, Jan 29 2013