OFFSET
1,2
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
LINKS
EXAMPLE
Cell filling begins, starting from an empty line:
| | | | | | | | | | | | | | | | | | |
.
|1| |1| | | | | | | | | | | | | | | |
.
|1|2|1| | |2| | |2| | | | | | | | | |
.
|1|2|1|3| |2| | |2|3| | | |3| | | |3|
PROG
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Tamas Sandor Nagy, Dec 12 2022
STATUS
approved