OFFSET
1,2
COMMENTS
LINKS
Boris Putievskiy, Transformations [of] Integer Sequences And Pairing Functions arXiv:1212.2732 [math.CO], 2012.
FORMULA
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
CROSSREFS
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
