cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A326930 Height of the smallest stack in a block-stacking sequence.

Original entry on oeis.org

1, 3, 3, 3, 7, 6, 7, 8, 13, 10, 13, 12, 13, 15, 15, 15, 17, 21, 19, 21, 21, 21, 25, 24, 25, 27, 27, 27, 31, 30, 31, 32, 35, 34, 35, 39, 37, 39, 39, 39, 43, 42, 43, 44, 49, 46, 49, 48, 49, 51, 51, 51, 55, 54, 55, 56, 61, 58, 61, 60, 61, 63, 63, 63, 65, 69, 67, 69, 69, 69, 71, 75
Offset: 1

Views

Author

Christian Perfect, Oct 22 2019

Keywords

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.

Programs

  • PARI
    seq(n)={my(L=List(), a=vector(n)); for(n=1, #a, if(#L && L[1]Andrew Howroyd, Oct 22 2019
  • 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)