%I #28 Feb 16 2022 11:59:27
%S 1,1,2,1,2,1,1,2,1,3,1,2,1,3,2,1,2,1,3,2,1,1,2,1,3,2,1,4,1,2,1,3,2,1,
%T 4,3,1,2,1,3,2,1,4,3,2,1,2,1,3,2,1,4,3,2,1,1,2,1,3,2,1,4,3,2,1,5,1,2,
%U 1,3,2,1,4,3,2,1,5,4,1,2,1,3,2,1,4,3,2,1,5,4,3,1,2,1,3,2,1,4,3,2,1,5,4,3,2,1,2,1,3,2,1,4,3,2,1,5,4,3,2
%N Reluctant sequence of reverse reluctant sequence A004736.
%C Sequence B is called a reluctant sequence of sequence A, if B is triangle array read by rows: row number k coincides with first k elements of the sequence A.
%C Sequence B is called a reverse reluctant sequence of sequence A, if B is triangle array read by rows: row number k lists first k elements of the sequence A in reverse order.
%C Sequence A004736 is the reverse reluctant sequence of sequence 1,2,3,... (A000027).
%H Boris Putievskiy, <a href="/A218828/b218828.txt">Rows n = 1..140 of triangle, flattened</a>
%H Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations Integer Sequences And Pairing Functions</a>, arXiv:1212.2732 [math.CO], 2012.
%F T(n,k) = A004736(k) for every n.
%F As a linear array, the sequence is a(n) = (t1^2+3*t1+4)/2-n1, where n1=n-t(t+1)/2, t1=floor[(-1+sqrt(8*n1-7))/2], t=floor[(-1+sqrt(8*n-7))/2].
%e The start of the sequence as triangle array T(n,k) is:
%e 1;
%e 1,2;
%e 1,2,1;
%e 1,2,1,3;
%e 1,2,1,3,2;
%e 1,2,1,3,2,1;
%e ...
%o (Python)
%o t=int((math.sqrt(8*n-7) - 1)/ 2)
%o n1=n-t*(t+1)/2
%o t1=int((math.sqrt(8*n1-7) - 1)/ 2)
%o m=(t1*t1+3*t1+4)/2-n1
%Y Cf. A004736, A002260, A220280.
%K easy,nonn,tabl
%O 1,3
%A _Boris Putievskiy_, Dec 15 2012
|