login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A218828
Reluctant sequence of reverse reluctant sequence A004736.
1
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, 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, 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
OFFSET
1,3
COMMENTS
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.
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.
Sequence A004736 is the reverse reluctant sequence of sequence 1,2,3,... (A000027).
LINKS
Boris Putievskiy, Transformations Integer Sequences And Pairing Functions, arXiv:1212.2732 [math.CO], 2012.
FORMULA
T(n,k) = A004736(k) for every n.
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].
EXAMPLE
The start of the sequence as triangle array T(n,k) is:
1;
1,2;
1,2,1;
1,2,1,3;
1,2,1,3,2;
1,2,1,3,2,1;
...
PROG
(Python)
t=int((math.sqrt(8*n-7) - 1)/ 2)
n1=n-t*(t+1)/2
t1=int((math.sqrt(8*n1-7) - 1)/ 2)
m=(t1*t1+3*t1+4)/2-n1
CROSSREFS
KEYWORD
easy,nonn,tabl
AUTHOR
Boris Putievskiy, Dec 15 2012
STATUS
approved