login
A210536
T(n,k) = 3*n + (k-1) mod 3 - 2; n , k > 0, read by antidiagonals.
0
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, 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, 28, 2, 4, 9, 11, 13, 18, 20, 22, 27, 29, 31, 3, 5, 7, 12, 14, 16, 21, 23, 25, 30, 32, 34
OFFSET
1,2
COMMENTS
Columns 3*k-2 are A016777,
Columns 3*k-1 are A016789,
Columns 3*k are A008585.
Rows 1 is A010882.
LINKS
FORMULA
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).
EXAMPLE
The start of the sequence as table:
1....2...3...1...2...3...1...2...3...
4....5...6...4...5...6...4...5...6...
7....8...9...7...8...9...7...8...9...
10..11..12..10..11..12..10..11..12...
13..14..15..13..14..15..13..14..15...
16..17..18..16..17..18..16..17..18...
19..20..21..19..20..21..19..20..21...
22..23..24..22..23..24..22..23..24...
25..26..27..25..26..27..25..26..27...
...
The start of the sequence as triangle array read by rows:
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,4,9,11,13,18,20,22;
3,5,7,12,14,16,21,23,25;
...
MAPLE
T:= (n, k)-> 3*n+irem(k-1, 3)-2:
seq(seq(T(n, 1+d-n), n=1..d), d=1..12); # Alois P. Heinz, Dec 30 2025
PROG
(Python)
t=int((math.sqrt(8*n-7) - 1)/ 2)
i=n-t*(t+1)/2
j=(t*t+3*t+4)/2-n
result=3*i + (j-1) % 3 - 2
KEYWORD
nonn,tabl
AUTHOR
Boris Putievskiy, Jan 29 2013
EXTENSIONS
Row 10 corrected and row 11 completed by Georg Fischer, Dec 30 2025
STATUS
approved