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”).
%I #20 May 24 2021 00:08:20
%S 1,2,1,3,4,2,1,5,3,2,1,6,4,7,8,5,3,2,1,9,6,4,10,7,11,12,8,5,3,2,1,13,
%T 9,6,4,14,10,7,5,3,2,1,15,11,8,6,4,3,2,1,16,12,9,7,5,17,13,10,18,14,
%U 19,20,15,11,8,6,4,3,2,1,21,16,12,9,7,5,22,17,13,10,23,18,14,11,8,6,4,3,2,1
%N If the terms of this sequence are divided into groups, the lengths of which are the terms of this sequence, the k-th term in a group is one greater than the k-th term in the previous group with at least k terms or 1 if no such group exists.
%H Samuel B. Reid, <a href="/A334081/b334081.txt">Table of n, a(n) for n = 1..10000</a>
%H Samuel B. Reid, <a href="/A334081/a334081.py.txt">Python program for A334081</a>
%e --------------------
%e n a(n) n-th Group
%e --------------------
%e 1 1 [1]
%e 2 2 [2,1]
%e 3 1 [3]
%e 4 3 [4,2,1]
%e 5 4 [5,3,2,1]
%e 6 2 [6,4]
%e 7 1 [7]
%e 8 5 [8,5,3,2,1]
%e 9 3 [9,6,4]
%o (Python) # See Links section.
%Y Cf. A000002, A332864.
%K nonn,look,tabf
%O 1,2
%A _Samuel B. Reid_, Apr 14 2020