OFFSET
1,2
COMMENTS
This sequence describes a block-stacking process: at step 1, start with a single stack of height 1. At step n>1, if n is less than or equal to the height of the smallest stack, start a new stack of height n. Otherwise, add n to the height of the smallest stack.
PROG
(Python)
def seq():
towers = [0]
for i in range(1, 100):
towers = sorted(towers)
if i <= towers[0]:
towers = [i] + towers
else:
towers = [towers[0] + i] + towers[1:]
yield min(towers)
(PARI) seq(n)={my(L=List(), a=vector(n)); for(n=1, #a, if(#L && L[1]<n, L[1]+=n, listput(L, n)); listsort(L); a[n]=L[1]); a} \\ Andrew Howroyd, Oct 22 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Christian Perfect, Oct 22 2019
STATUS
approved