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.

A359027 A line of empty cells is filled by successive terms t >= 1 with t+1 copies of t and gaps of t empty cells between them.

Original entry on oeis.org

1, 2, 1, 3, 4, 2, 5, 6, 2, 3, 7, 8, 4, 3, 9, 10, 5, 3, 11, 4, 12, 6, 13, 14, 4, 5, 7, 15, 16, 4, 8, 6, 5, 17, 18, 9, 19, 7, 5, 20, 6, 10, 21, 22, 5, 8, 11, 23, 6, 7, 24, 12, 9, 25, 26, 6, 13, 8, 7, 27, 10, 28, 6, 14, 29, 30, 9, 7, 11, 8, 15, 31, 32, 16, 12, 7, 10
Offset: 1

Views

Author

Tamas Sandor Nagy, Dec 12 2022

Keywords

Comments

We write 1 into the first cell, then by leaving a gap of one empty cell we write another 1 into the third cell.
Next, we write 2 into the first available empty cell, then write two more 2's by leaving gaps of two empty cells between them. And so on.
It appears that the absolute values of A166711 appear in order nicely embedded into this sequence. - Thomas Scheuerle, Dec 12 2022

Examples

			Cell filling begins, starting from an empty line:
  | | | | | | | | | | | | | | | | | | |
  .
  |1| |1| | | | | | | | | | | | | | | |
  .
  |1|2|1| | |2| | |2| | | | | | | | | |
  .
  |1|2|1|3| |2| | |2|3| | | |3| | | |3|
		

Crossrefs

Cf. A166711.
Cf. A028920 (with infinite copies).

Programs

  • MATLAB
    function a = A359027( max_n )
        a = zeros(1,max_n);
        f = 1:max_n; k = 1;
        while ~isempty(f)
            j = f(1:(k+1):end);
            a(j(j(1:min(k+1,length(j))) <= max_n )) = k;
            k = k+1;
            f = find(a == 0);
        end
    end % Thomas Scheuerle, Dec 12 2022