|
|
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, 2, 9, 31, 3, 5, 7, 12, 14, 16
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
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;
. . .
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|