OFFSET
1,1
LINKS
Boris Putievskiy, Rows n = 1..140 of triangle, flattened
Boris Putievskiy, Transformations Integer Sequences And Pairing Functions, arXiv:1212.2732 [math.CO], 2012.
FORMULA
EXAMPLE
The start of the sequence as triangle array read by rows:
2;
2,2;
3,2,3;
4,1,1,4;
5,2,2,2,5;
6,2,1,1,2,6;
...
PROG
(Python)
t=int((math.sqrt(8*n-7) - 1)/ 2)
a = n-t*(t+1)/2
b= (t*t+3*t+4)/2-n
m= int(a/b)+int(b/a)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Boris Putievskiy, Dec 21 2012
STATUS
approved